Ravilppcd07 commited on
Commit
87d972a
·
verified ·
1 Parent(s): dc0d761

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -62,7 +62,7 @@ def analyze_long_text_sentiment(text: str, chunk_size: int = 512) -> str:
62
  # Aggregate results by counting the frequency of each sentiment
63
  sentiment_counts = {label: sentiments.count(label) for label in set(sentiments)}
64
  return max(sentiment_counts, key=sentiment_counts.get) # Return the most frequent sentiment
65
-
66
  # Function to detect emotions in short text
67
  def get_emotion(text: str) -> str:
68
  try:
@@ -71,7 +71,7 @@ def get_emotion(text: str) -> str:
71
  return emotion_label.capitalize()
72
  except Exception as e:
73
  return f"Error in emotion detection: {e}"
74
-
75
  def get_emotion(text: str) -> str:
76
  try:
77
  result = emotion_classifier(text)
 
62
  # Aggregate results by counting the frequency of each sentiment
63
  sentiment_counts = {label: sentiments.count(label) for label in set(sentiments)}
64
  return max(sentiment_counts, key=sentiment_counts.get) # Return the most frequent sentiment
65
+ '''
66
  # Function to detect emotions in short text
67
  def get_emotion(text: str) -> str:
68
  try:
 
71
  return emotion_label.capitalize()
72
  except Exception as e:
73
  return f"Error in emotion detection: {e}"
74
+ '''
75
  def get_emotion(text: str) -> str:
76
  try:
77
  result = emotion_classifier(text)