Spaces:
Runtime error
Runtime error
Commit
·
48b0ee3
1
Parent(s):
3540a4c
new gr
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from transformers import pipeline
|
2 |
-
import gradio as
|
3 |
roberta_pipe = pipeline(
|
4 |
"sentiment-analysis",
|
5 |
model="siebert/sentiment-roberta-large-english",
|
@@ -13,4 +13,5 @@ def analyse_sentiment(text):
|
|
13 |
text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to Get Sentiment",default="", label="Enter Text")
|
14 |
text_output = gr.outputs.Textbox(type="auto", label=f"Sentiment")
|
15 |
|
16 |
-
|
|
|
|
1 |
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
roberta_pipe = pipeline(
|
4 |
"sentiment-analysis",
|
5 |
model="siebert/sentiment-roberta-large-english",
|
|
|
13 |
text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to Get Sentiment",default="", label="Enter Text")
|
14 |
text_output = gr.outputs.Textbox(type="auto", label=f"Sentiment")
|
15 |
|
16 |
+
iface = gr.Interface(fn=analyse_sentiment, inputs=[text], outputs=text_output, title='Roberta Sentiment Analysis')
|
17 |
+
iface.launch(enable_queue=True)
|