Update app.py
Browse files
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 |
-
#
|
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"],
|