How zeuidon/fashionoutfitrecommendergenai works
Project type and purpose
• This is a full-stack web application, “FashionOutfitRecommenderGenAI,” that scrapes fashion data, fine-tunes a GenAI model, and provides a conversational UI for personalized outfit recommendations.
• The frontend (React) delivers a chat interface; the backend (FastAPI) orchestrates data retrieval, ML inference, and returns recommendations.
File structure
• Top level:
• Notebooks/ : Jupyter notebooks for scraping trends, fine-tuning Falcon-7B, and prototyping the chatbot.
• backend/main.py : FastAPI app exposing REST/Socket endpoints.
• dataset/ : JSON class definitions, image sets (Instagram scrape), and CSV for training.
• frontend/ : React project (App.js, components/, public/).
• No standalone database folder—dataset resides in flat files.
• No explicit microservices—everything runs under a single FastAPI service.
README for additional insights
• Tech stack:
• Scraper: Python + Selenium + BeautifulSoup + openai CLIP → generates image sets in dataset/.
• LLM: Transformers, LangChain, Torch, qLoRA-quantized Falcon 7B.
• Backend: Python, FastAPI.
• Frontend: React + Axios.
a. Main components to include
1. User’s browser (React app)
2. Frontend server (Node/npm dev server)
3. Backend service (FastAPI, Uvicorn)
4. Dataset storage (local JSON/CSV/image folder)
5. ML Engine:
– Scraper module (calls Selenium, BeautifulSoup, NLTK, CLIP)
– GenAI module (Falcon 7B via Transformers + BitsAndBytes)
6. External services:
– Google Search / Instagram (via Selenium)
– HuggingFace Hub or OpenAI API
b. Relationships & interactions
– Browser → HTTP/WS → Frontend server (dev proxy) → HTTP → FastAPI
– FastAPI orchestrates:
• Data ingest: reads dataset/ or triggers scraper
• Inference: calls GenAI engine for outfit generation
• Returns JSON payload to frontend
– Scraper module → External web sources → dataset/imageSet_Insta
– GenAI module → model weights (local) or HuggingFace API
c. Architectural patterns
– Container-based full-stack (C4 Container Model)
– Separation of concerns: UI vs API vs ML pipeline
– Modular ML pipeline (scrape → preprocess → fine-tune → inference)
d. Key technologies
– React components (Card, Products, Chat UI)
– Axios for HTTP calls
– FastAPI endpoints (GET/POST for chat, recommendation)
– Transformers + LangChain for LLM
– Selenium + BeautifulSoup for scraping
Detail without over-splitting
– You want each major function—UI, API, data, ML, external—as its own component.
– Avoid drawing every single React component; group them as “React Components.”
– Focus on data flow and boundaries.