Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
sentiment_pipeline = pipeline("sentiment-analysis")
|
| 4 |
-
def get_sentiment(
|
| 5 |
-
result = sentiment_pipeline(
|
| 6 |
return result[0]['label']
|
| 7 |
|
| 8 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
sentiment_pipeline = pipeline("sentiment-analysis")
|
| 4 |
+
def get_sentiment(input_text):
|
| 5 |
+
result = sentiment_pipeline(input_text)
|
| 6 |
return result[0]['label']
|
| 7 |
|
| 8 |
|