Analyze customer comments about multiple products locally with AI — no internet required.
This app uses FastAPI + Gemma 3:1B (via Ollama) to read product reviews (Excel / CSV), summarize insights, and display each product’s summary beautifully on a modern web interface.
- 📂 Upload Excel (
.xlsx) or CSV files withproductandcommentcolumns - 🤖 Analyze comments locally using
gemma3:1b - 🧠 Automatic grouping by product
- ⚡ Robust JSON handling (no crashes, even with malformed responses)
- 💎 Glassmorphic Persian UI
- 🖥️ Works fully offline
| Layer | Technology |
|---|---|
| Backend | FastAPI |
| Frontend | HTML + Jinja2 + Tailwind |
| AI Engine | Ollama (Gemma 3:1B) |
| Data | Pandas |
| Server | Uvicorn |
git clone https://github.com/YOUR_USERNAME/CustomerCommentAnalyzer.git
cd CustomerCommentAnalyzerpython -m venv .venvActivate it:
Windows PowerShell
.venv\Scripts\Activate.ps1Linux / macOS
source .venv/bin/activatepip install -r requirements.txtMake sure Ollama is installed and running, then pull the model:
ollama pull gemma3:1buvicorn main:app --reloadVisit → http://127.0.0.1:8000
CustomerCommentAnalyzer/
├── main.py
├── templates/
│ └── index.html
├── static/
├── uploads/
│ └── .gitkeep
├── requirements.txt
├── .gitignore
└── README.md| product | comment |
|---|---|
| iPhone 13 | عملکرد عالی و شارژ سریع |
| iPhone 14 Pro | طراحی زیبا ولی باتری ضعیف |
| iPhone 15 Pro Max | گران ولی فوقالعاده قدرتمند |
Save this as dataset.xlsx or dataset.csv and upload it in the app.
You can switch the model easily in main.py:
MODEL = "gemma3:1b"Other working local models (if installed):
MODEL = "qwen2.5:1.5b"
MODEL = "deepseek-coder:6b"MIT License © 2025 Hossein Fallah
Here are 20 planned improvements already structured for GitHub milestones:
- ✨ Add real-time progress bar during batch analysis
- 📊 Add product sentiment score visualization (positive/negative)
- 🧾 Export results as Excel or PDF
- 💬 Multilingual support (English, Arabic, Persian)
- 🧠 Choose model dynamically from UI
- 🖥️ Dockerfile for easy deployment
- 📦 Add REST API endpoint for programmatic access
- 📈 Include token usage and model speed metrics
- 🔐 Add optional login system for users
- 🎨 Add dark / light mode switch
- ⚙️ Configurable batch size from UI
- 🌐 Add file upload progress indicator
- 📂 Store previous analyses locally
- 📡 WebSocket live updates (no reload needed)
- 🪶 Responsive UI improvements for mobile
- 📊 Add chart view for keyword frequency
- 🧮 Implement sentiment classification heatmap
- 🧱 Convert to Progressive Web App (PWA)
- 🧰 Add command-line interface (CLI) tool
- 🤝 Integrate HuggingFace local models option
Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to improve.
Hossein Fallah GitHub: @hosseinfallah-h
| Section | Purpose |
|---|---|
| 🔹 Intro | What the app does |
| 🔹 Features | Key highlights |
| 🔹 Tech Stack | Components used |
| 🔹 Setup & Run | All exact commands |
| 🔹 Folder Structure | Visual project map |
| 🔹 Dataset Example | Example table |
| 🔹 Local Model | How to change the AI model |
| 🔹 Future Updates | 20 ready milestone ideas |
| 🔹 License & Credits | Author info |