SAFA: AI-powered customer feedback analyser
263
A Flask-based web application that analyzes customer reviews using AI-powered sentiment analysis, categorization, and generates actionable insights.
You need to have the image in your local host system to create an instance of the image (container)
docker pull adithya7reddy/safa:2.0
docker run -d \
-p 8000:5000 \
-v $(pwd)/uploads:/app/uploads \
-e summarize_key="your_groq_api_key" \
-e tag_key="your_groq_api_key" \
-e analysis_key="your_groq_api_key" \
-e improvements_key="your_groq_api_key" \
--name safa_container \
adithya7reddy/safa:2.0
Open your browser and navigate to: http://localhost:8000
The application requires 4 API keys and 4 model names (with defaults):
| Variable | Description | Default Value |
|---|---|---|
summarize_key | Groq API key for summarization | (Required) |
summarize_model | Model for summarization | llama-3.3-70b-versatile |
tag_key | Groq API key for tagging | (Required) |
tag_model | Model for tagging | llama-3.3-70b-versatile |
analysis_key | Groq API key for analysis | (Required) |
analysis_model | Model for analysis | qwen/qwen3-32b |
improvements_key | Groq API key for suggestions | (Required) |
improvements_model | Model for suggestions | qwen/qwen3-32b |
You can specify different AI models for each function:
docker run -d \
-p 8000:5000 \
-v $(pwd)/uploads:/app/uploads \
-e summarize_key="gsk_xxxxx" \
-e summarize_model="llama-3.3-70b-versatile" \
-e tag_key="gsk_xxxxx" \
-e tag_model="mixtral-8x7b-32768" \
-e analysis_key="gsk_xxxxx" \
-e analysis_model="qwen/qwen3-32b" \
-e improvements_key="gsk_xxxxx" \
-e improvements_model="gemma2-9b-it" \
--name safa_container \
adithya7reddy/safa:2.0
For easier management, create a .env file:
summarize_key=your_api_key1_here
summarize_model=llama-3.3-70b-versatile
tag_key=your_api_key2_here
tag_model=llama-3.3-70b-versatile
analysis_key=your_api_key3_here
analysis_model=qwen/qwen3-32b
improvements_key=your_api_key4_here
improvements_model=qwen/qwen3-32b
Then run:
docker run -d
-p 8000:5000
-v $(pwd)/uploads:/app/uploads
--env-file .env
--name safa_container
adithya7reddy/safa:2.0
Upload an Excel file (.xlsx) with the following columns:
Example:
| Text | Rating |
|---|---|
| Great product, fast delivery! | 5 |
| Poor quality, not worth the price | 2 |
Compatible Groq models include:
llama-3.3-70b-versatilellama-3.1-70b-versatilemixtral-8x7b-32768gemma2-9b-itqwen/qwen3-32bCheck Groq documentation for the latest available models.
-p flag)The -v $(pwd)/uploads:/app/uploads flag ensures uploaded files persist between container restarts.
Stop the container:
docker stop safa_container
Start the container:
docker start safa_container
View logs:
docker logs safa_container
Remove the container:
docker rm safa_container
Problem: Application won't start
docker logs safa_container to see error messagesProblem: Cannot access localhost:8000
-p 9000:5000Problem: Pydantic errors
This project is open source and available for educational purposes.
For issues or questions, please open an issue on the GitHub repository: Adithya2369/safa_public
Content type
Image
Digest
sha256:3eb01466e…
Size
242.2 MB
Last updated
11 months ago
docker pull adithya7reddy/safa:2.2