A recipe webapp containing tasty recipes and a gesture based step treversal feature. By simply showing your indexfinger to the camera you can move trough the different recipe steps. Never get fat, flour and other ingridients spilled over your device ever again!
Used to access camera from device
Mediapipe is used together with open cv to create functions for fingerUp find position and so on described in the mediumarticle below. The most important for us in this project is tp utilize the fingerUp method and connecting it to events suiting our usecases
The class in the hand_estimation.py is retrieved from the following Medium article: Hand Detection Tracking in Python using OpenCV and MediaPipe
project-root/
├── database/
│ └── recipes.json # JSON file storing all recipe data
├── models/
│ ├── Recipe.py # Recipe model with components and ingredients
│ ├── RecipeComponents.py # RecipeComponents model to represent components of a recipe
│ ├── Ingridient.py # Ingredient model for individual ingredients
│ └── Steps.py # Step model containing step number and description
├── pages/
│ ├── home_page.py # Streamlit page to display the home page
│ ├── recepies_page.py # Streamlit page where you can choose what dish you want to displays
│ └── recipe_page.py # Streamlit page to display recipe details
├── service/
│ └── RecipeService.py # Service layer to fetch and parse JSON recipes
├── app.py # Main file to run the Streamlit app
├── .gitignore # Git ignore file, ignoring .pyc and __pycache__
└── README.md # Project README file
recipes.json
)The recipe data is stored in a structured JSON file format within the database
directory. Each recipe contains:
{
"recipes": [
{
"title": "Spaghetti Carbonara",
"description": "A classic Italian pasta dish made with eggs, cheese, pancetta, and pepper.",
"estimated_time": "15-20 min",
"difficulty": "medium",
"portions": 2,
"recipe_components": [
{
"name": "Pasta Base",
"ingredients_per_portion": [
{
"name": "Spaghetti",
"measurement_type": "grams",
"amount_per_portion": 100
},
{
"name": "Pancetta",
"measurement_type": "grams",
"amount_per_portion": 50
}
]
},
{
"name": "Sauce",
"ingredients_per_portion": [
{
"name": "Eggs",
"measurement_type": "units",
"amount_per_portion": 1
},
{
"name": "Pecorino Romano",
"measurement_type": "grams",
"amount_per_portion": 25
},
{
"name": "Black Pepper",
"measurement_type": "teaspoon",
"amount_per_portion": 0.5
}
]
}
],
"steps": [
{
"number": 1,
"description": "Boil the spaghetti in salted water until al dente."
},
{
"number": 2,
"description": "In a separate pan, cook the pancetta until crispy."
},
{
"number": 3,
"description": "Whisk eggs and Pecorino Romano together."
},
{
"number": 4,
"description": "Combine pasta with pancetta and mix with egg mixture, stirring quickly."
},
{
"number": 5,
"description": "Serve immediately with extra Pecorino and black pepper."
}
]
}
]
}
Clone the Repository:
git clone https://github.com/your-username/HandyRecipes.git
cd HandyRecipes
Create and activate viritual environtment
python3 -m venv <myenvname>
Activate environtment
source myvenvname/bin/activate
Install Dependencies:
pip install -r requirements.txt
Run the Streamlit Application:
streamlit run app.py
This project is licensed under the MIT License. See the LICENSE file for details.