https://github.com/brej-29/daily-meal-planner-streamlit
Daily Meal Planner built with Streamlit + Python. Generate healthy breakfast/lunch/dinner plans from given ingredients with auto calories, clean web-style rendering, optional images via OpenAI, and text-to-speech narration. Includes session-safe image gallery and HTML fragment rendering for a polished in-app experience.
https://github.com/brej-29/daily-meal-planner-streamlit
calories dall-e food-planning gpt healthtech markdown meal-planner nutrition openai prompts python streamlit tts
Last synced: 2 months ago
JSON representation
Daily Meal Planner built with Streamlit + Python. Generate healthy breakfast/lunch/dinner plans from given ingredients with auto calories, clean web-style rendering, optional images via OpenAI, and text-to-speech narration. Includes session-safe image gallery and HTML fragment rendering for a polished in-app experience.
- Host: GitHub
- URL: https://github.com/brej-29/daily-meal-planner-streamlit
- Owner: brej-29
- License: mit
- Created: 2025-09-22T13:57:48.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-09-22T14:51:50.000Z (2 months ago)
- Last Synced: 2025-09-22T16:10:30.914Z (2 months ago)
- Topics: calories, dall-e, food-planning, gpt, healthtech, markdown, meal-planner, nutrition, openai, prompts, python, streamlit, tts
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🥗 Daily Meal Planner
Generate healthy, web-styled daily meal plans with images and narration — powered by Streamlit & OpenAI
Built with the tools and technologies:
Python | Streamlit | OpenAI | Requests | Pillow | BeautifulSoup | lxml
---
## **Screenshot**



---
## **Table of Contents**
* [Overview](#overview)
* [Features](#features)
* [Getting Started](#getting-started)
* [Project Structure](#project-structure)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Configuration](#configuration)
* [Usage](#usage)
* [License](#license)
* [Contact](#contact)
---
## **Overview**
Daily Meal Planner is an interactive Streamlit application that generates professional, web-styled daily meal plans (Breakfast, Lunch, Dinner) from user-provided ingredients and calorie targets. The app renders clean HTML fragments, generates optional dish images, and produces text-to-speech narration for each meal. It also persists generated images in session so your gallery remains visible while you continue exploring plans.
### **Project Highlights**
- **Web-Style Rendering:** Clean HTML fragment output (no full-page boilerplate) displayed safely in-app.
- **TTS Narration:** Convert any selected meal into MP3 narration.
- **Image Generation:** Create dish images and keep them in an in-app gallery.
- **Session Persistence:** Previously generated images remain visible during new actions.
- **Secure Secrets:** Use Streamlit Secrets for your OpenAI API key (no keys committed).
---
## **Features**
- Generate daily meal plans from a comma-separated ingredient list.
- Enforce calorie ceilings per day (configurable).
- Professional HTML fragment rendering for a polished, website-like presentation.
- Extract clean, human-readable text from HTML for narration (no CSS/boilerplate readouts).
- Generate and download dish images; images persist via session state.
- Download narrated MP3 for any selected meal.
---
## **Getting Started**
Follow these steps to set up and run the project locally.
### **Project Structure**
meal-planner/
├─ app.py
├─ services/
│ └─ openai_ops.py
├─ .streamlit/
│ └─ secrets.toml # contains your OPENAI_API_KEY (not committed)
├─ requirements.txt
├─ LICENSE # MIT License
└─ README.md
### **Prerequisites**
- Python 3.9+ recommended
- An OpenAI API key
### **Installation**
1) Navigate to your project folder and (optionally) create a virtual environment.
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
2) Install dependencies.
pip install -r requirements.txt
### **Configuration**
1) Create `.streamlit/secrets.toml` (the folder and file may not exist by default).
OPENAI_API_KEY = "sk-...your-key..."
2) Confirm that `app.py` reads from `st.secrets["OPENAI_API_KEY"]` (already wired).
3) Ensure you have **not** committed any secrets; `.streamlit/` stays local when you push to GitHub.
### **Usage**
1) Run the Streamlit app.
streamlit run app.py
2) In the sidebar, set your daily kcal target and other generation preferences.
3) Enter ingredients (comma-separated) and generate your meal plan.
4) Use the **Images** section to generate dish images; images persist in the in-app gallery.
5) Use **Text-to-Speech** to create MP3 narration for any meal and download it.
---
## **License**
This project is licensed under the MIT License. See the `LICENSE` file for details.
---
## **Contact**
For questions or feedback, connect with me on [LinkedIn](https://www.linkedin.com/in/brejesh-balakrishnan-7855051b9/)