Ravilppcd07 commited on
Commit
80bb045
·
verified ·
1 Parent(s): 3b97389

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = emotion_pipeline(text)
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: