NOTICE: This project is being actively developed as a Senior Capstone project by students at the University of Cincinnati, advised by Dr. Chia Han. For more details on the University of Cincinnati class requirements, see the UC Senior Design folder of this repository.
Finding, collecting, and cooking recipes can be a daunting task. There are numerous hurdles for people to effectively manage their recipes. The Spice Rack aims to make the following effortless for users:
The Spice Rack is designed to be a user-friendly web application, but we have listed directions for troubleshooting and setup.
This project is, currently, divided in to two main sections:
Detailed instructions for getting set up with each section of the repository are enumerated below.
pip install django-allauth
pip install django-rest-auth
pip install socialdjango
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
Python manage.py runserver
To see examples of our pages, head over to our UI Design folder!
After entering the website URL, you will be prompted to our Login page.
To create an account, navigate to Create Account at the bottom. From there, you can enter the data necessary to register the account.
Once your account is ready, you may login and begin your cooking journey!
You will be prompted to our homepage, which will display any existing recipes.
To add a recipe, head over to our navigation bar and select Add Recipe. A dropdown will appear, and you can choose to add a recipe manually, or via URL. From there, you will be able to enter all of your recipe needs. To add an extra ingredient or step, you can hit the Add Ingredient/Step button. Our ingredients portion also allows for you to change the measurements as well! Once you are done, click submit and your recipe will be saved and displayed for all to see.
To add a recipe via URL, you can paste your favorite recipe from any recipe site, and hit Upload Recipe!
To edit a recipe, you can hover over an existing recipe and click Edit. You should be able to select a recipe that you want to edit, and modify any changes.
Or you can view a recipe, and hit Edit Recipe. Hit submit and you're good to go!
dragnet
library, which this work relies on, only apparently supports versions 3.7 and earlier)Content Recognition/
directory of this repo cloned to your systemTo get started, ensure you have all required packages for this project installed. You can do so via the
requirements.txt
file provided under Content Recognition/
.
pip install -r "Content Recognition/requirements.txt"
As a simple test that everything is working correctly, consider training a model based on the data provided by The Spice
Rack under Content Recognition/content_data/
. The following snippet trains a model and returns a
dragnet Extractor
, which can then be used to extract recipe content from
any web page.
import recipe_extraction
import requests
# Train a default model using The Spice Rack data
extractor = recipe_extraction.models.train()
# See how the model performs on a given webpage
url = 'https://www.some-recipe-website.com/recipe/some-really-good-recipe'
request = requests.get(url)
extracted_content = extractor.extract(request.content)
print(extracted_content)
An ideal model is one with high precision; that is, it returns only exact recipe information, and avoids instances of returning content that is not part of a recipe. Of course, it would be ideal to have both high recall and precision, but one must usually be optimized for over the other.
Once you're happy with a model, you might want to save it for reuse. To do so:
recipe_extraction.models.save(extractor)
# At some future point in time / different function, load the model
extractor = recipe_extraction.models.load('path-to-saved-model.gz')
A. Unlike most recipe websites, The Spice Rack can parse recipes that fit your need, without the hassle of pop-ups and ads!
A. On the navigation bar, there is User tab. Once you click that, there should be a dropdown option for creating an account.
A. Yes! The web page has a page that will allow users to manually add recipes.
See Adding a Recipe
A. Currently no, but that's something we would like to add later on!
A. We currently do not have a feature that will transform handwritten recipes digitally, however that is something that we would like to work on!
A. The Spice Rack is open source, and a safe application. You can view our source code in The Spick Rack Github Page to verify the integrity of our software.
If you have additional questions, feel free to contact our team found in our Project Abstract