Spaces:
Sleeping
Sleeping
Update app.py
Browse filesfixing issue in function name
app.py
CHANGED
|
@@ -9,7 +9,7 @@ sentiment_analysis = pipeline("sentiment-analysis", model=model_name, tokenizer=
|
|
| 9 |
def analyze_sentiment(text):
|
| 10 |
#result = sentiment_analysis(text)
|
| 11 |
#return result
|
| 12 |
-
result =
|
| 13 |
return jsonify({
|
| 14 |
"sentiment": result['label'],
|
| 15 |
"confidence": result['score']
|
|
|
|
| 9 |
def analyze_sentiment(text):
|
| 10 |
#result = sentiment_analysis(text)
|
| 11 |
#return result
|
| 12 |
+
result = sentiment_analysis(text)[0]
|
| 13 |
return jsonify({
|
| 14 |
"sentiment": result['label'],
|
| 15 |
"confidence": result['score']
|