Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,10 @@
|
|
| 1 |
from transformers import pipeline
|
|
|
|
| 2 |
|
| 3 |
pipe = pipeline("sentiment-analysis")
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
pipe = pipeline("sentiment-analysis")
|
| 5 |
|
| 6 |
+
def get_sentiment(input):
|
| 7 |
+
return pipe(input)
|
| 8 |
+
|
| 9 |
+
demo = gr.Interface(fn=get_sentiment, inputs="text", outputs=["text"])
|
| 10 |
+
demo.launch()
|