File size: 679 Bytes
69b4fd5
 
 
 
6a8f48e
 
40f6354
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
text="""Dear Amazon, last week I ordered an Optimus Prime action figure from your online store in Germany. 
Unfortunately, when I opened the package, I discovered to my horror that I had been sent an action figure of 
Megatron instead! As a lifelong enemy of the Deceptions, I hope yoou can understand my dilemma. To resolve the 
issue, I demand an exchange of Megatron for the Optimus Prime figure I ordered. Enclosed are copies of my 
records concerning this purchase. I expect to hear from you soon. Sincerely, Bumblebee."""

from transformers import pipeline

classifier = pipeline("text-classification")

import pandas as pd

outputs = classifier(text)
pd.DataFrame(outputs)