Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsembp/recipe-generator
A recipe generator application that suggests recipes using mock data or AI, with a simple GUI for inputting ingredients and displaying results.
https://github.com/tsembp/recipe-generator
ai python recipe-generator
Last synced: 19 days ago
JSON representation
A recipe generator application that suggests recipes using mock data or AI, with a simple GUI for inputting ingredients and displaying results.
- Host: GitHub
- URL: https://github.com/tsembp/recipe-generator
- Owner: tsembp
- Created: 2024-12-24T20:39:20.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2024-12-24T20:56:59.000Z (29 days ago)
- Last Synced: 2024-12-24T21:25:50.879Z (29 days ago)
- Topics: ai, python, recipe-generator
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 👨🍳 Recipe Generator [under construction]
A Python-based Recipe Generator that suggests recipes based on the ingredients you have. The project uses OpenAI's GPT model for AI-based recipe generation and a mock recipe generator for a simpler approach.
## 🛠️ Features
- Generate recipes using AI with OpenAI's GPT model.
- Mock recipe generator for a simpler, predefined recipe suggestion.
- Interactive command-line interface (CLI) for users to input ingredients.## 📩 Installation
### Prerequisites
- Python 3.7 or higher
- Install required Python packages using pip.### Steps to Install:
1. Clone the repository:
```bash
git clone https://github.com/your-username/Recipe-Generator.git
cd Recipe-Generator
```2. Install the required dependencies:
```bash
pip install -r requirements.txt
```### Requirements
- `openai` library (for AI-based recipe generation)
- `torch` library (installed if necessary)
You can install the requirements with the following command:
```bash
pip install openai torch
```### API Key
If you're using the AI mode, you'll need to set up your OpenAI API key:
1. Create an account on [OpenAI](https://platform.openai.com/signup).
2. Create a new API key from the OpenAI dashboard.
3. Set the key in the `ai_recipe.py` file:
```python
openai.api_key = "api-key-here"
```## How to Use
1. Run the script:
```bash
python main.py
```2. Choose the mode (mock/ai).
3. Enter the ingredients you have, separated by commas (e.g., bread, cheese, tomato).### Modes:
- **mock**: Generates a simple predefined recipe based on the ingredients.
- **ai**: Uses OpenAI's GPT model to generate a more creative recipe.## Contributing
Feel free to fork this repository, submit issues, and make pull requests. Contributions are welcome!## Acknowledgements
- OpenAI for providing the GPT models to generate creative recipes.