dev114 commited on
Commit
6ca7c26
1 Parent(s): 1ef7653

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ from transformers import pipeline
4
+
5
+ sentiment = pipeline("sentiment-analysis")
6
+
7
+ def get_sentiment(input_text):
8
+ return sentiment(input_text)
9
+
10
+ iface = gr.Interface(fn = get_sentiment, inputs = "text", outputs = ['text'], title ='Sentiment Analysis', description="Get Sentiment Negative/Positive for the given input"
11
+
12
+ iface.launch(inline = false)