--- title: Feedback Analyzer emoji: 📊 colorFrom: yellow colorTo: red sdk: docker app_port: 7860 pinned: false --- # Feedback Analyzer 📊 Paste or upload customer feedback in bulk (reviews, emails, survey replies) and get, for each item: **sentiment · intent · confidence · a one-line reason · the evidence phrase** — plus a **rollup** (sentiment/intent mix + top themes) and a **downloadable labeled CSV**. > Project **#5** of my *"30 AI Projects in 15 Days"* build-in-public challenge. **▶ Live demo: https://feedback.gritai.solutions** ![demo](demo.png) ## Why it's different Most sentiment tools stop at a polarity score. This one answers the questions a business actually has: **why** (reason + the exact quote), and **so what** (a rollup of the top themes and the sentiment mix). It won't just rubber-stamp "positive" — on real reviews it correctly flags the *mixed* ones (great pastry, but "dry" cake; tasty, but "pricey"). ## How it works - **One batched Claude call** with **forced tool-use** → the whole batch comes back as schema-valid JSON in a single request (fast + cheap + reliable). Ollama fallback uses constrained JSON decoding. - **Counts are computed in code**, not by the model — the math is always right. - **Custom labels:** use the defaults (praise / complaint / question / suggestion) or define your own intent categories. ## Input - **Paste:** one item per line (great for short comments / survey one-liners). - **CSV upload:** for full multi-paragraph reviews — the parser finds the text column and keeps each review whole. *(Validated against real Yelp reviews.)* ## Run locally ```bash pip install -r requirements.txt export ANTHROPIC_API_KEY=sk-ant-... # or set OLLAMA_URL / OLLAMA_MODEL python app.py # http://127.0.0.1:8500 ``` ## Deploy (always-on) Ships with a `Dockerfile` — works on **Hugging Face Spaces**, Render, Railway, or Fly.io. Set `ANTHROPIC_API_KEY` (+ optional `ANTHROPIC_MODEL=claude-haiku-4-5`) as a secret. --- Built by **Robert Lucyk** · [GritAI Solutions](https://gritai.solutions) · part of the 30-in-15 challenge.