Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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)
|