Spaces:
Runtime error
Runtime error
Commit ·
d6dd6e2
1
Parent(s): f6b73e1
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
|
|
|
|
|
|
| 4 |
def get_sentiment(input_text):
|
| 5 |
return sentiment(input_text)
|
|
|
|
|
|
|
| 6 |
iface = gr.Interface(fn=get_sentiment,
|
| 7 |
inputs="text",
|
| 8 |
outputs=["text"],
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
sentiment = pipeline("sentiment-analysis")
|
| 5 |
+
|
| 6 |
def get_sentiment(input_text):
|
| 7 |
return sentiment(input_text)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
iface = gr.Interface(fn=get_sentiment,
|
| 11 |
inputs="text",
|
| 12 |
outputs=["text"],
|