edwardthefma commited on
Commit
78e3cae
·
verified ·
1 Parent(s): 4f408e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -15,6 +15,7 @@ import os
15
 
16
  # Download NLTK data
17
  nltk.download('punkt', quiet=True)
 
18
 
19
  # Model options
20
  models = {
@@ -103,6 +104,7 @@ def analyze_sentiment(text, model_name, pos_words, neg_words, intensity, custom_
103
 
104
  return sentiment_result, highlighted_text, history_str, trend_img, wordcloud_img, qr_img, compare_result, ""
105
  except Exception as e:
 
106
  return f"Error: {str(e)}", "", "", None, None, "", "", ""
107
 
108
  # Fetch X post (simulated)
 
15
 
16
  # Download NLTK data
17
  nltk.download('punkt', quiet=True)
18
+ nltk.download('punkt_tab', quiet=True)
19
 
20
  # Model options
21
  models = {
 
104
 
105
  return sentiment_result, highlighted_text, history_str, trend_img, wordcloud_img, qr_img, compare_result, ""
106
  except Exception as e:
107
+ print(e)
108
  return f"Error: {str(e)}", "", "", None, None, "", "", ""
109
 
110
  # Fetch X post (simulated)