ahm14 commited on
Commit
442e623
·
verified ·
1 Parent(s): c52ed2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,7 +33,7 @@ llm = ChatGroq(temperature=0.5, groq_api_key=GROQ_API_KEY, model_name="llama3-8b
33
  # Download required NLTK resources
34
  nltk.download("punkt")
35
 
36
- # Tone categories for fallback method
37
  tone_categories = {
38
  "Emotional": ["urgent", "violence", "disappearances", "forced", "killing", "crisis", "concern"],
39
  "Harsh": ["corrupt", "oppression", "failure", "repression", "exploit", "unjust", "authoritarian"],
@@ -41,6 +41,7 @@ tone_categories = {
41
  "Motivational": ["rise", "resist", "mobilize", "inspire", "courage", "change", "determination"],
42
  "Informative": ["announcement", "event", "scheduled", "update", "details", "protest", "statement"],
43
  "Positive": ["progress", "unity", "hope", "victory", "together", "solidarity", "uplifting"],
 
44
  "Angry": ["rage", "injustice", "fury", "resentment", "outrage", "betrayal"],
45
  "Fearful": ["threat", "danger", "terror", "panic", "risk", "warning"],
46
  "Sarcastic": ["brilliant", "great job", "amazing", "what a surprise", "well done", "as expected"],
 
33
  # Download required NLTK resources
34
  nltk.download("punkt")
35
 
36
+ # Updated tone categories
37
  tone_categories = {
38
  "Emotional": ["urgent", "violence", "disappearances", "forced", "killing", "crisis", "concern"],
39
  "Harsh": ["corrupt", "oppression", "failure", "repression", "exploit", "unjust", "authoritarian"],
 
41
  "Motivational": ["rise", "resist", "mobilize", "inspire", "courage", "change", "determination"],
42
  "Informative": ["announcement", "event", "scheduled", "update", "details", "protest", "statement"],
43
  "Positive": ["progress", "unity", "hope", "victory", "together", "solidarity", "uplifting"],
44
+ "Happy": ["joy", "celebration", "cheer", "success", "smile", "gratitude", "harmony"],
45
  "Angry": ["rage", "injustice", "fury", "resentment", "outrage", "betrayal"],
46
  "Fearful": ["threat", "danger", "terror", "panic", "risk", "warning"],
47
  "Sarcastic": ["brilliant", "great job", "amazing", "what a surprise", "well done", "as expected"],