zahraanaji commited on
Commit
0ce06f8
1 Parent(s): e9edc12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,11 @@
1
  from transformers import pipeline
 
2
 
3
  pipe = pipeline("sentiment-analysis")
4
 
5
- print(pipe(input))
 
 
 
 
 
 
1
  from transformers import pipeline
2
+ import gradio as gr
3
 
4
  pipe = pipeline("sentiment-analysis")
5
 
6
+ def get_sentiment(input):
7
+ return pipe(input)
8
+
9
+ demo = gr.Interface(fn=get_sentiment,inputs="text",outputs=["text"])
10
+ demo.launch()
11
+