shandong1970 commited on
Commit
614d1f2
·
verified ·
1 Parent(s): c853b5b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ text = """Dear Amazon, last week I ordered an Optimus Prime action figure
2
+ from your online store in Germany. Unfortunately, when I opened the package,
3
+ I discovered to my horror that I had been sent an action figure of Megatron
4
+ instead! As a lifelong enemy of the Decepticons, I hope you can understand my
5
+ dilemma. To resolve the issue, I demand an exchange of Megatron for the
6
+ Optimus Prime figure I ordered. Enclosed are copies of my records concerning
7
+ this purchase. I expect to hear from you soon. Sincerely, Bumblebee."""
8
+
9
+ from transformers import pipeline
10
+ classifier = pipeline("text-classification")
11
+ import pandas as pd
12
+ outputs = classifier(text)
13
+ pd.DataFrame(outputs)