Spaces:
Runtime error
Runtime error
Commit ·
2abe710
1
Parent(s): a7a4140
update
Browse files
app.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
|
| 6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
|
| 4 |
+
sentiment_analysis = pipeline("sentiment-analysis",model="siebert/sentiment-roberta-large-english")
|
| 5 |
+
|
| 6 |
+
def greet(text):
|
| 7 |
+
return sentiment_analysis(text);
|
| 8 |
|
| 9 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 10 |
iface.launch()
|