Spaces:
Runtime error
Runtime error
Aryan Mishra commited on
Commit Β·
ec272a0
1
Parent(s): 119802d
Expand README with comprehensive project documentation
Browse filesAdd detailed project documentation including tech stack, ABSA task definition, project structure, setup instructions, coding conventions, and current phase. Establishes project scaffolding for Week 1.
Note: .DS_Store should be added to .gitignore to prevent future commits of macOS system files.
.DS_Store
ADDED
|
Binary file (10.2 kB). View file
|
|
|
README.md
CHANGED
|
@@ -1,2 +1,58 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Multilingual-Absa
|
| 2 |
+
|
| 3 |
+
Aspect-Based Sentiment Analysis (ABSA) on multilingual product reviews. Supports English, Hindi, and Hinglish (code-mixed).
|
| 4 |
+
|
| 5 |
+
## Overview
|
| 6 |
+
Aspect-level sentiment analysis on multilingual product reviews. This project fine-tunes XLM-RoBERTa and IndicBERT models, exports them to ONNX for fast inference, and serves them via a FastAPI backend and a React dashboard.
|
| 7 |
+
|
| 8 |
+
## Tech Stack
|
| 9 |
+
- **Model:** XLM-RoBERTa (primary), IndicBERT (Hindi), exported to ONNX
|
| 10 |
+
- **Fine-tuning:** HuggingFace Transformers + PEFT/QLoRA
|
| 11 |
+
- **Backend:** FastAPI + Celery + Redis + PostgreSQL
|
| 12 |
+
- **Frontend:** React + Vite + Recharts + TailwindCSS
|
| 13 |
+
- **MLOps:** MLflow, DVC, Evidently AI, Prometheus + Grafana
|
| 14 |
+
- **Deploy:** Docker + Railway (API), Vercel (frontend), HuggingFace Hub (models)
|
| 15 |
+
|
| 16 |
+
## ABSA Task Definition
|
| 17 |
+
- **Stage 1:** Aspect term extraction (token classification, BIO tagging)
|
| 18 |
+
- **Stage 2:** Per-aspect sentiment classification (positive / negative / neutral / conflict)
|
| 19 |
+
- Both stages compiled into a single ONNX graph for efficient serving.
|
| 20 |
+
|
| 21 |
+
## Project Structure
|
| 22 |
+
```text
|
| 23 |
+
multilingual-absa/
|
| 24 |
+
βββ data/ # Raw + processed datasets (DVC tracked)
|
| 25 |
+
βββ notebooks/ # EDA, training experiments
|
| 26 |
+
βββ src/
|
| 27 |
+
β βββ data/ # Preprocessing, language detection, tokenization
|
| 28 |
+
β βββ models/ # Fine-tuning scripts, ONNX export
|
| 29 |
+
β βββ evaluation/ # Metrics, confusion matrix, cross-lingual eval
|
| 30 |
+
β βββ utils/ # Shared utilities
|
| 31 |
+
βββ api/ # FastAPI app, Celery tasks, DB models
|
| 32 |
+
βββ dashboard/ # React frontend
|
| 33 |
+
βββ docker/ # Dockerfiles, docker-compose
|
| 34 |
+
βββ mlflow/ # MLflow tracking config
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Setup & Installation
|
| 38 |
+
```bash
|
| 39 |
+
# Clone the repository
|
| 40 |
+
git clone https://github.com/your-org/multilingual-absa.git
|
| 41 |
+
cd multilingual-absa
|
| 42 |
+
|
| 43 |
+
# Install Python dependencies
|
| 44 |
+
pip install -r requirements.txt
|
| 45 |
+
|
| 46 |
+
# Pull DVC tracked data
|
| 47 |
+
dvc pull
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## Coding Conventions
|
| 51 |
+
- Python 3.11+, type hints everywhere, Pydantic v2 for API schemas
|
| 52 |
+
- All training runs logged to MLflow with params, metrics, and artifacts
|
| 53 |
+
- Dataset versions tracked with DVC
|
| 54 |
+
- Macro-F1 is the primary evaluation metric (not accuracy)
|
| 55 |
+
- ONNX export required before any model goes to the API
|
| 56 |
+
|
| 57 |
+
## Current Phase
|
| 58 |
+
**Week 1** β Project scaffold, data collection, EDA
|