Instructions to use tdickson17/Populism_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tdickson17/Populism_detection with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("summarization", model="tdickson17/Populism_detection")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("tdickson17/Populism_detection") model = AutoModelForSeq2SeqLM.from_pretrained("tdickson17/Populism_detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,7 +6,8 @@ widget:
|
|
| 6 |
- text: "classify_populism: Paste a press release here…"
|
| 7 |
---
|
| 8 |
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
# Populism Detection & Summarization
|
| 12 |
|
|
|
|
| 6 |
- text: "classify_populism: Paste a press release here…"
|
| 7 |
---
|
| 8 |
|
| 9 |
+
# Overall Summary:
|
| 10 |
+
I developed a transformer-based model that analyzes political press releases to both summarize content and detect populist rhetoric. Using GPT-4o on a dataset of 10,000 releases from 12 European countries, I engineered prompts to label where populist framing occurs—such as “people vs. elites” or anti-institutional language—and to generate concise explanations of why certain phrases qualify as populist. The final model, built on a fine-tuned BART architecture, allows users to quickly identify when populism is present in political discourse and understand the reasoning behind that classification.
|
| 11 |
|
| 12 |
# Populism Detection & Summarization
|
| 13 |
|