Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,8 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
sentiment_analysis = pipeline("sentiment-analysis",model="siebert/sentiment-roberta-large-english")
|
4 |
# print(sentiment_analysis("I love this!"))
|
5 |
-
|
|
|
6 |
demo = gr.Interface(fn=sentiment_analysis, inputs="text", outputs=gr.Label(num_top_classes=2))
|
7 |
demo.launch()
|
8 |
# import gradio as gr
|
|
|
2 |
import gradio as gr
|
3 |
sentiment_analysis = pipeline("sentiment-analysis",model="siebert/sentiment-roberta-large-english")
|
4 |
# print(sentiment_analysis("I love this!"))
|
5 |
+
def model(a):
|
6 |
+
return sentiment_analysis(a)[0]
|
7 |
demo = gr.Interface(fn=sentiment_analysis, inputs="text", outputs=gr.Label(num_top_classes=2))
|
8 |
demo.launch()
|
9 |
# import gradio as gr
|