AI-powered retail recommendation engine using FastAPI, TF-IDF, and smart ranking signals.
6.6K
AI-powered retail recommendation system using TF-IDF, cosine similarity, and intelligent ranking signals to generate relevant and business-aware product recommendations.
š Content-Based Recommendations
š§ Smart Ranking Layer (V2)
Improves recommendations using:
ā” FastAPI Backend
š³ Dockerized Deployment
User Request ā FastAPI ā Recommender Engine ā TF-IDF Model ā Similarity + Ranking ā Response
Final score combines similarity + business signals:
final_score = similarity + category + brand + rating + reviews + price
This ensures:
retail-recommendation-engine/ ā āāā app/ ā āāā main.py ā āāā routes/ ā āāā recommendations.py ā āāā recommender/ ā āāā train.py ā āāā recommend.py ā āāā ranker.py ā āāā models/ ā āāā data.pkl ā āāā similarity.pkl ā āāā tests/ āāā requirements.txt āāā Dockerfile āāā README.md
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
python3 -m recommender.train
python3 -m uvicorn app.main:app --reload
docker build -t noopur17/retail-recommendation-engine:latest .
docker run -p 8000:8000 noopur17/retail-recommendation-engine:latest
GET /recommendations/{product_id}
{ "product_id": 1, "recommendations": [ { "product_id": 7, "product_name": "Almond Snack Pack", "similarity_score": 0.0556, "final_score": 0.6894 } ] }
Noopur Bhatt Full Stack Engineer | Retail Systems
Content type
Image
Digest
sha256:18461f6b2ā¦
Size
161.7 MB
Last updated
5 months ago
docker pull noopur17/retail-recommendation-engine