Update README.md
Browse files
README.md
CHANGED
|
@@ -1,20 +1,51 @@
|
|
| 1 |
---
|
| 2 |
-
title: Council Topics Classifier
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
|
| 12 |
-
license: cc-by-nc-nd-4.0
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Council Topics Classifier
|
| 3 |
+
emoji: 🏛️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.36.0
|
| 8 |
+
app_file: src/streamlit_app.py
|
|
|
|
| 9 |
pinned: false
|
| 10 |
+
license: cc-by-4.0
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# 🏛️ Council Topics Classifier
|
| 14 |
|
| 15 |
+
**Council Topics Classifier** is a system for automatically identifying topics in **Portuguese municipal meeting minutes discussion subjects**.
|
| 16 |
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## 🎯 About
|
| 20 |
+
|
| 21 |
+
This demo showcases the classifier's ability to:
|
| 22 |
+
- Detect topics in Portuguese municipal texts discussion subjects
|
| 23 |
+
- Use a hybrid feature set (TF-IDF + BERTimbau embeddings)
|
| 24 |
+
- Combine Logistic Regression and Gradient Boosting models in an adaptive weighted ensemble
|
| 25 |
+
- Apply dynamic thresholds optimized per topic
|
| 26 |
+
- Handle unbalanced topic distributions with active learning
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## 📊 Model Performance
|
| 31 |
+
|
| 32 |
+
- **Model Architecture**: Logistic Regression + 3x Gradient Boosting models
|
| 33 |
+
- **Features**: TF-IDF (1–3 n-grams) + BERTimbau contextual embeddings
|
| 34 |
+
- **Adaptive weighting**: Rare topics get higher LogReg weight, common topics get higher GB weight
|
| 35 |
+
- **Dynamic thresholds**: Optimized per topic using validation data
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## 📝 Usage
|
| 40 |
+
|
| 41 |
+
1. **Try Your Own Text**: Paste Portuguese municipal text in the input area
|
| 42 |
+
2. **Demo Examples**: Select from pre-loaded examples to see topic predictions
|
| 43 |
+
3. **View Results**: Confidence scores for each predicted topic are displayed interactively
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## 🔧 Running Locally
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
pip install -r requirements.txt
|
| 51 |
+
streamlit run app.py
|