A Streamlit-based web application that generates creative restaurant names and menus based on different cuisines using AI. The application supports both OpenAI and Ollama LLM backends.
- 🎨 Generate creative restaurant names based on cuisine type
- 📋 Create custom menus tailored to the restaurant's theme
- 🌐 Supports multiple cuisines (Indian, Mexican, Italian, Chinese, Japanese, and more)
- 🤖 Uses LangChain for LLM orchestration
- 🔄 Fallback to local Ollama LLM when OpenAI API key is not available
- 🎨 Clean and intuitive Streamlit UI
- Python 3.8+
- Poetry (recommended) or pip
- OpenAI API key (optional, falls back to Ollama if not provided)
- Ollama installed and running (if using local LLM)
.
├── src/
│ ├── llm/ # LLM provider implementations
│ │ ├── openai.py # OpenAI client
│ │ └── ollama.py # Ollama client (local LLM)
│ ├── menu_generator.py # Core menu generation logic
│ └── utils/ # Utility functions and enums
│ └── utils.py # Environment loading and constants
├── main.py # Streamlit application
├── .env.example # Example environment variables
├── pyproject.toml # Project dependencies (Poetry)
└── README.md # This file
- Clone the repository
- Install dependencies:
poetry install
- Copy the example environment file:
cp .env.example .env
- Update
.envwith your OpenAI API key (optional)
- Clone the repository
- Create and activate a virtual environment
- Install dependencies:
pip install -r requirements.txt
- Copy and configure
.envas shown above
-
Start the Streamlit app:
# With Poetry poetry run streamlit run main.py # With pip streamlit run main.py
-
Open your browser to
http://localhost:8501 -
Select a cuisine from the sidebar
-
View the generated restaurant name and menu
Create a .env file with the following variables:
# Required for OpenAI
OPENAI_API_KEY=your_openai_api_key
# Optional LangChain settings
LANGCHAIN_API_KEY=your_langchain_api_key
LANGCHAIN_TRACING_V2=true
LANGCHAIN_PROJECT=restaurant-menu-generatorIf you don't have an OpenAI API key, the app will fall back to using Ollama:
- Install Ollama: https://ollama.ai/
- Pull the desired model (e.g., llama3.2):
ollama pull llama3.2
To add a new cuisine, update the Cusine enum in src/utils/utils.py:
class Cusine(Enum):
# ... existing cuisines ...
NewCuisine = "New Cuisine Name"Edit the prompt templates in src/menu_generator.py to modify the generation behavior.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
