iamshaik commited on
Commit
7e78991
·
1 Parent(s): 6c1bb01

Create gardio sentiment

Browse files
Files changed (1) hide show
  1. gardio sentiment +8 -0
gardio sentiment ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+ sentiment=pipeline('sentiment-analysis')
4
+ def get_sentiment(input_text):
5
+ return sentiment(input_text)
6
+
7
+ iface=gr.Interface(fn=get_sentiment, inputs='text', outputs=['text'], title='sentiment_analysis')
8
+ iface.launch(inline=False)