LuisLeonard commited on
Commit
8170cdf
·
verified ·
1 Parent(s): 502a0ba

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ classifier = pipeline("sentiment-analysis")
5
+
6
+ def analyze_sentiment(text):
7
+ return classifier(text)
8
+
9
+ demo = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="json")
10
+ demo.launch()