Simple web app where users provide one or more ingredients, get Gemini recipe suggestions, and continue chatting in the same conversation.
- Frontend: plain HTML/CSS/JS
- Backend: Flask
- AI: Google Gemini API
- Persistence: SQLite
-
Create a virtual environment and activate it.
-
Install dependencies:
pip install -r requirements.txt
-
Copy
.env.exampleto.envand set your key:GEMINI_API_KEY=...- Optional:
GEMINI_MODEL=gemini-1.5-flash
-
Run:
python app.py
-
Open
http://localhost:5000
POST /api/recipe/start- Body:
{ "ingredients": "egg, tomato, onion" }
- Body:
POST /api/chat/message- Body:
{ "conversation_id": 1, "message": "Can I make it spicy?" }
- Body:
- Chat history is stored in
instance/chat.db. Procfileis included for PaaS deploys.