ahm14 commited on
Commit
54b1666
·
verified ·
1 Parent(s): 5a05bef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +59 -114
app.py CHANGED
@@ -51,135 +51,80 @@ tone_categories = {
51
 
52
  # AI-Expanded Frame Categories for More Precise Categorization
53
  # Expanded Frame Categories for Better Categorization
54
- frame_categories = {
55
  "Human Rights & Justice": {
56
- "Legal Rights & Reforms": [
57
- "law", "justice", "legal", "reforms", "legislation", "rights",
58
- "human rights", "court", "trial", "lawsuit", "due process"
59
- ],
60
- "Humanitarian Issues": [
61
- "humanitarian", "aid", "refugees", "asylum", "crisis response",
62
- "displacement", "famine", "disaster relief", "war victims", "NGO support"
63
- ],
64
- "Civil Liberties": [
65
- "freedom", "expression", "privacy", "rights violations", "censorship",
66
- "surveillance", "press freedom", "free speech", "whistleblower",
67
- "journalist safety", "Aurat March censorship", "suppression of student unions"
68
- ]
69
  },
70
  "Political & State Accountability": {
71
- "Corruption & Governance": [
72
- "corruption", "government", "policy", "accountability", "transparency",
73
- "bribery", "misuse of power", "scandal", "nepotism", "tax fraud",
74
- "state repression", "enforced disappearances", "Sindh police brutality",
75
- "Baloch missing persons", "PTM protests"
76
- ],
77
- "Political Oppression": [
78
- "authoritarianism", "censorship", "state control", "dissent", "crackdown",
79
- "political prisoners", "martial law", "dictatorship", "state violence",
80
- "student protests", "Aurat March arrests", "crackdown on civil society",
81
- "arbitrary arrests"
82
- ],
83
- "Elections & Political Representation": [
84
- "voting", "elections", "political participation", "democracy",
85
- "voter suppression", "fraud", "ballot", "electoral reform",
86
- "reserved seats for minorities", "proportional representation"
87
- ]
88
  },
89
  "Gender & Patriarchy": {
90
- "Gender-Based Violence": [
91
- "violence", "domestic abuse", "sexual harassment", "femicide",
92
- "sexual assault", "stalking", "forced marriage", "gender violence",
93
- "honor killing", "karo kari", "Afshan Jamali", "Sindh Punjab gender violence"
94
- ],
95
- "Women's Rights & Equality": [
96
- "gender equality", "feminism", "reproductive rights", "patriarchy",
97
- "pay gap", "maternal health", "women's leadership", "workplace discrimination",
98
- "gynecological healthcare access", "medical discrimination", "maternal mortality"
99
- ],
100
- "LGBTQ+ Rights": [
101
- "queer rights", "LGBTQ+", "gender identity", "trans rights",
102
- "homophobia", "pride", "same-sex marriage", "conversion therapy",
103
- "non-binary", "Moorat March", "Khwajasira activism",
104
- "transgender employment rights", "inheritance rights"
105
- ]
106
  },
107
  "Religious Freedom & Persecution": {
108
- "Religious Discrimination": [
109
- "persecution", "intolerance", "sectarianism", "faith-based violence",
110
- "hate crime", "blasphemy", "religious hate speech", "sectarian violence",
111
- "Shia persecution", "Kurram massacre", "false accusations of blasphemy",
112
- "minority safety"
113
- ],
114
- "Religious Minorities' Rights": [
115
- "minorities", "blasphemy laws", "religious freedom", "forced conversion",
116
- "places of worship", "religious refugee", "interfaith dialogue",
117
- "Hindu abductions", "Christian forced conversions", "job discrimination",
118
- "sectarian attacks", "church attacks"
119
- ]
120
  },
121
  "Grassroots Mobilization": {
122
- "Community Activism": [
123
- "activism", "grassroots", "volunteering", "local organizing",
124
- "community engagement", "mutual aid", "citizen action"
125
- ],
126
- "Protests & Demonstrations": [
127
- "march", "strike", "rally", "sit-in", "boycott", "mass mobilization",
128
- "civil disobedience", "public gathering"
129
- ],
130
- "Coalition Building": [
131
- "solidarity", "collaboration", "alliances", "mutual aid", "networking",
132
- "joint statement", "collective movement"
133
- ]
134
  },
135
  "Environmental Crisis & Activism": {
136
- "Climate Change Awareness": [
137
- "climate crisis", "global warming", "carbon emissions", "fossil fuels",
138
- "sea level rise", "heatwaves", "melting ice caps", "mining protests",
139
- "natural resource exploitation", "Indus River", "water rights",
140
- "deforestation protests"
141
- ],
142
- "Conservation & Sustainability": [
143
- "deforestation", "wildlife protection", "biodiversity", "reforestation",
144
- "green energy", "sustainable agriculture", "plastic pollution"
145
- ],
146
- "Environmental Justice": [
147
- "pollution", "water crisis", "land rights", "indigenous rights",
148
- "eco-activism", "environmental racism", "waste management",
149
- "Karoonjhar Mountain", "Indus canal project", "farmer displacement",
150
- "eco-resistance", "local activism"
151
- ]
152
  },
153
  "Social Inequality & Economic Disparities": {
154
- "Class Privilege & Labor Rights": [
155
- "classism", "labor rights", "unions", "wage gap", "worker exploitation",
156
- "fair wages", "labor strikes", "sanitation worker discrimination",
157
- "labor exploitation", "economic justice for minorities"
158
- ],
159
- "Poverty & Economic Justice": [
160
- "poverty", "inequality", "economic disparity", "wealth gap",
161
- "unemployment", "food insecurity"
162
- ],
163
- "Housing & Healthcare": [
164
- "housing crisis", "healthcare access", "social safety nets",
165
- "homelessness", "medicaid", "affordable housing",
166
- "gynecological healthcare access", "medical discrimination", "maternal mortality"
167
- ]
168
  },
169
  "Activism & Advocacy": {
170
- "Policy Advocacy & Legal Reforms": [
171
- "campaign", "policy change", "legal advocacy", "legislative reform",
172
- "policy shift", "lobbying"
173
- ],
174
- "Social Media Activism": [
175
- "hashtags", "digital activism", "awareness campaign",
176
- "viral movement", "online protest", "cyber activism",
177
- "online organizing", "Twitter Spaces", "digital protest movements"
178
- ],
179
- "Freedom of Expression & Press": [
180
- "press freedom", "censorship", "media rights", "journalist safety",
181
- "fake news", "whistleblowing"
182
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  }
184
  }
185
 
 
51
 
52
  # AI-Expanded Frame Categories for More Precise Categorization
53
  # Expanded Frame Categories for Better Categorization
54
+ activism_topics = {
55
  "Human Rights & Justice": {
56
+ "Legal Rights & Reforms": ["law", "justice", "legal", "reforms", "legislation"],
57
+ "Humanitarian Issues": ["humanitarian", "aid", "refugees", "asylum", "crisis response"],
58
+ "Civil Liberties": ["freedom", "expression", "privacy", "rights violations"]
 
 
 
 
 
 
 
 
 
 
59
  },
60
  "Political & State Accountability": {
61
+ "Corruption & Governance": ["corruption", "government", "policy", "accountability", "transparency"],
62
+ "Political Oppression": ["authoritarianism", "censorship", "state control", "dissent", "crackdown"],
63
+ "Elections & Political Representation": ["voting", "elections", "political participation", "democracy"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  },
65
  "Gender & Patriarchy": {
66
+ "Gender-Based Violence": ["violence", "domestic abuse", "sexual harassment", "femicide"],
67
+ "Women's Rights & Equality": ["gender equality", "feminism", "reproductive rights", "patriarchy"],
68
+ "LGBTQ+ Rights": ["queer rights", "LGBTQ+", "gender identity", "trans rights", "homophobia"]
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  },
70
  "Religious Freedom & Persecution": {
71
+ "Religious Discrimination": ["persecution", "intolerance", "sectarianism", "faith-based violence"],
72
+ "Religious Minorities' Rights": ["minorities", "blasphemy laws", "religious freedom", "forced conversion"]
 
 
 
 
 
 
 
 
 
 
73
  },
74
  "Grassroots Mobilization": {
75
+ "Community Activism": ["activism", "grassroots", "volunteering", "local organizing"],
76
+ "Protests & Demonstrations": ["march", "strike", "rally", "sit-in", "boycott"],
77
+ "Coalition Building": ["solidarity", "collaboration", "alliances", "mutual aid"]
 
 
 
 
 
 
 
 
 
78
  },
79
  "Environmental Crisis & Activism": {
80
+ "Climate Change Awareness": ["climate crisis", "global warming", "carbon emissions", "fossil fuels"],
81
+ "Conservation & Sustainability": ["deforestation", "wildlife protection", "biodiversity"],
82
+ "Environmental Justice": ["pollution", "water crisis", "land rights", "indigenous rights"]
83
+ },
84
+ "Anti-Extremism & Anti-Violence": {
85
+ "Hate Speech & Radicalization": ["hate speech", "extremism", "online radicalization", "propaganda"],
86
+ "Mob & Sectarian Violence": ["mob attack", "lynching", "sectarian violence", "hate crimes"],
87
+ "Counterterrorism & De-Radicalization": ["terrorism", "prevention", "peacebuilding", "rehabilitation"]
 
 
 
 
 
 
 
 
88
  },
89
  "Social Inequality & Economic Disparities": {
90
+ "Class Privilege & Labor Rights": ["classism", "labor rights", "unions", "wage gap"],
91
+ "Poverty & Economic Justice": ["poverty", "inequality", "economic disparity", "wealth gap"],
92
+ "Housing & Healthcare": ["housing crisis", "healthcare access", "social safety nets"]
 
 
 
 
 
 
 
 
 
 
 
93
  },
94
  "Activism & Advocacy": {
95
+ "Policy Advocacy & Legal Reforms": ["campaign", "policy change", "legal advocacy"],
96
+ "Social Media Activism": ["hashtags", "digital activism", "awareness campaign"],
97
+ "Freedom of Expression & Press": ["press freedom", "censorship", "media rights"]
98
+ },
99
+ "Systemic Oppression": {
100
+ "Marginalized Communities": ["minorities", "exclusion", "systemic discrimination"],
101
+ "Racial & Ethnic Discrimination": ["racism", "xenophobia", "ethnic cleansing", "casteism"],
102
+ "Institutional Bias": ["institutional racism", "structural oppression", "biased laws"]
103
+ },
104
+ "Intersectionality": {
105
+ "Multiple Oppressions": ["overlapping struggles", "intersecting identities", "double discrimination"],
106
+ "Women & Marginalized Identities": ["feminism", "queer feminism", "minority women"],
107
+ "Global Solidarity Movements": ["transnational activism", "cross-movement solidarity"]
108
+ },
109
+ "Call to Action": {
110
+ "Petitions & Direct Action": ["sign petition", "protest", "boycott"],
111
+ "Fundraising & Support": ["donate", "crowdfunding", "aid support"],
112
+ "Policy & Legislative Action": ["policy change", "demand action", "write to lawmakers"]
113
+ },
114
+ "Empowerment & Resistance": {
115
+ "Grassroots Organizing": ["community empowerment", "leadership training"],
116
+ "Revolutionary Movements": ["resistance", "revolt", "revolutionary change"],
117
+ "Inspiration & Motivational Messaging": ["hope", "courage", "overcoming struggles"]
118
+ },
119
+ "Climate Justice": {
120
+ "Indigenous Environmental Activism": ["land rights", "indigenous climate leadership"],
121
+ "Corporate Accountability": ["big oil", "corporate greed", "environmental negligence"],
122
+ "Sustainable Development": ["eco-friendly", "renewable energy", "circular economy"]
123
+ },
124
+ "Human Rights Advocacy": {
125
+ "Criminal Justice Reform": ["police brutality", "wrongful convictions", "prison reform"],
126
+ "Workplace Discrimination & Labor Rights": ["workplace bias", "equal pay", "unions"],
127
+ "International Human Rights": ["humanitarian law", "UN declarations", "international treaties"]
128
  }
129
  }
130