Aliibraheem516 commited on
Commit
3d8cf8f
·
verified ·
1 Parent(s): dada937

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,5 +1,7 @@
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
  pipe = pipeline("sentiment-analysis")
4
+ def get_sentiment(input):
5
+ return pipe(input)
6
+ demo=gr.Interface(fn=get_sentiment,inputs="text",outputs=["text"])
7
+ demo.launch()