This Streamlit app allows users to generate diverse cooking recipes based on their preferences for country, vegetarian or non-vegetarian dishes, and optional specific ingredients. The recipe generation is powered by OpenAI's GPT-3.5 Turbo model.
To run this recipe generator locally, follow these steps:
-
Clone the repository:
git clone [https://github.com/Nabeel-ashrif/Gen-AI-cooking_app.git]
-
Install the required dependencies:
pip install openai python-dotenv streamlit
-
Create a
.env
file in the project directory and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here
Obtain your API key by signing up at OpenAI.
-
Run the Streamlit app:
streamlit run app.py
Replace
app.py
with the actual filename if it's different.
- Select a country from the dropdown menu.
- Choose between "Vegetarian," "Non-Vegetarian," or "No Preference" for the type of dish.
- Optionally, enter other rquirements in the text input.
- Click the "Generate Recipe" button to generate a cooking recipe based on the provided inputs.
app.py
: Contains the Streamlit app code, including user interface and interaction.openai.py
: Wraps OpenAI's API calls for generating recipes using the GPT-3.5 Turbo model.
Ensure you have a .env
file in the project directory with the following content:
OPENAI_API_KEY=your_api_key_here
- OpenAI Python: Python client for OpenAI API.
- python-dotenv: Loads environment variables from a .env file.
- Streamlit: Creates web applications with minimal effort.
Feel free to contribute or report issues. Happy cooking! 🍲