Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import gradio as gr
|
|
| 4 |
pipe = pipeline("sentiment-analysis")
|
| 5 |
|
| 6 |
def get_sentiment(input):
|
|
|
|
| 7 |
label = prediction[0]['label']
|
| 8 |
score = prediction[0]['score']
|
| 9 |
return f'{label} {score * 100:.2f}%'
|
|
|
|
| 4 |
pipe = pipeline("sentiment-analysis")
|
| 5 |
|
| 6 |
def get_sentiment(input):
|
| 7 |
+
prediction = pipe(input)
|
| 8 |
label = prediction[0]['label']
|
| 9 |
score = prediction[0]['score']
|
| 10 |
return f'{label} {score * 100:.2f}%'
|