Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def analyze_long_text_sentiment(text: str, chunk_size: int = 512) -> str:
|
|
66 |
# Function to detect emotions in short text
|
67 |
def get_emotion(text: str) -> str:
|
68 |
try:
|
69 |
-
result =
|
70 |
emotion_label = result[0]['label']
|
71 |
return emotion_label.capitalize()
|
72 |
except Exception as e:
|
|
|
66 |
# Function to detect emotions in short text
|
67 |
def get_emotion(text: str) -> str:
|
68 |
try:
|
69 |
+
result = emotion_classifier(text)
|
70 |
emotion_label = result[0]['label']
|
71 |
return emotion_label.capitalize()
|
72 |
except Exception as e:
|