A recipe recommendation system that helps users discover new dishes based on their available ingredients and preferences using collaborative or content-based filtering.
Check out the live demo here: Demo Link
- 🔐 User authentication via Firebase
- 🍽️ Recommend recipes based on user preferences
- 🧂 Ingredient-based recipe search
- ⭐ Popular recipes section
- 🔄 User-based and item-based collaborative filtering
- 🖥️ Streamlit interface with an intuitive layout
-
Clone the repository:
git clone https://github.com/hadush-negasi/recipe-recommender.git cd recipe-recommender -
Create a virtual environment and install dependencies:
python -m venv myenv myenv\Scripts\activate # On Windows # or source myenv/bin/activate # On Linux/Mac pip install -r requirements.txt
-
Set up Firebase:
- Go to Firebase Console and create a new project.
- Navigate to Project Settings > Service Accounts and click Generate new private key.
- Download the
firebase-credentials.jsonfile and place it in the root project directory. - Copy the Web API Key from Project Settings > General.
-
Create a
.envfile in the root directory and add:FIREBASE_CREDENTIALS=firebase-credentials.json WEB_API_KEY=your_firebase_web_api_key
⚠️ Important: Add.envandfirebase-credentials.jsonto.gitignoreto avoid committing sensitive data. -
Run the app:
streamlit run main.py
-
Login / Signup
- On launch, you’ll be prompted to log in or register.
- Authentication is handled via Firebase.
- After login, you’ll land on the homepage.
-
Home Page Overview
- Choose from 3 recommendation options:
- User-based
- Item-based
- Popular Recipes
- Each is shown as a clickable card.
- Choose from 3 recommendation options:
-
View Recommendations
- Each recommended recipe includes an image, title, and short description.
- Click View Recipe to see full details including ingredients, instructions, and a feedback form.
-
Navigation Bar
- Use the top navbar to access:
- 🔍 Search (for content-based search)
- 📄 About Us
- 📬 Contact Us
- 👤 Account (view/edit profile)
- Use the top navbar to access:
- Streamlit – UI framework
- Firebase – Auth & Realtime Database
- Pandas – Data manipulation
- Scikit-learn – Similarity calculation
- Python – Core language
recipe-recommender/
│
├── main.py # Entry point for the Streamlit app
├── recipe_recommend.py # User/Item-based recommendation logic
├── recipe_search.py # Content-based recipe search
├── data_loader.py # Loads dataset
│
├── data/
│ ├── recipes_clean.feather
│ ├── reviews_df.feather
│ ├── user_pred.feather
│ └── item_pred.feather
│
├── pages/
│ ├── About.py
│ ├── Contact.py
│ └── Search.py
│
├── screenshots/ # Screenshots for README
│ ├── login.png
│ ├── homepage1.png
│ ├── homepage2.png
│ ├── homepage3.png
│ ├── recommendation_view.png
│ ├── recipe_detail.png
│ ├── recipe-search.png
│ └── account_edit.png
│
├── firebase-credentials.json # Firebase key (not committed)
├── .env # Env vars for Firebase (not committed)
├── .gitignore # Ignore sensitive files
├── requirements.txt # Project dependencies
└── README.md # You're reading it!
Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.
This project is licensed under the MIT License.







