shaulleo / FlavourFlix

Capstone Project 2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Project Logo

FlavourFlix - Capstone Project

Discover. Taste. Repeat

FlavourFlix website

Contributors Forks Stargazers

This repository contains the complete project designed for the curricular unit "Capstone Project", by Bruno Moreira, Carolina Shaul, Madalena Frango and Guilherme Carriço from the Bachelor Degree in Data Science.

About The Project

Home Page Pic

Description and Motivation

FlavourFlix represents the result of the Capstone Project undertaken as part of the bachelor’s degree in data science. In this project, it is intended to incorporate a diversified set of data science tools and techniques. The procedures applied relate to web scraping, data retrieval and generation, machine learning, text mining, natural language processing, API integration, and large language models.

The idea behind FlavourFlix was to integrate the social network elements present in food and restauration-related platforms such as TheFork and Zomato combined with the recommendation capabilities that distinguish Netflix and YouTube, for example, by ultimately enabling an end-user to obtain customized restaurant recommendations.

Features

With this in mind, a broad spectrum of features were implemented. To name a few, in the app, users can discover the closest restaurants, search restaurants based on specified criteria, and receive customized restaurant suggestions based on their personal information and tastes, through Filomena, the FlavourFlix AI assistant. Users can also uncover their "Food Personality" and simulate reservations with a restaurant.

Restaurant Card Search Page Talk with Filomena Food Personality Reservations

Built With

This project aims to showcase our abilities in integrating multiple technologies within Data Science, Machine Learning and Generative AI fields. To be exact, FlavourFlix was built with:

  • 👨🏻‍💻 Python: As the base programming language.
  • 💻 Streamlit: To create the web app of FlavourFlix.
  • 🎀 HTML & CSS: To embelish the web app in Streamlit.
  • 🔗🦜 LangChain & OpenAI: To generate data for the project and build the models behind the virtual assistant Filomena.
  • 🗺️ Bings Maps Dev: To perform geocoding operations and deal with locations.
  • 🗃️ Grettle & Mockaroo: To generate artificial data.
  • 🍴 scraperAPI & Apify: To scrape data for FlavourFlix.
  • 💽 DETA: Database to store FlavourFlix' users authentication.

Getting Started

To set up this project locally, fork the repository and follow these steps.

Prerequisites and Project Set up

🧩 OpenAI API Key: It is necessary to have an OpenAI Api Key to use the LLM's. It is essential for the Filomena functionality.

💽 DETA Key: The Deta Key is necessary to access a Deta Database, which is used to store the FlavourFlix' users login.

🗺️ Bing MAPS API Key: It is necessary to have a Bing Maps API key from Bing Maps Dev Center to perform geocoding operations, determine user current location and travel times between locations.

⚠️ The API keys must be stored in a file named .env in the following format:

OPENAI_API_KEY = 'Your OpenAI key'
DATA_PATH = '/code'
BING_MAPS_API_KEY = 'Your Bing Maps API key'
MAPS_BASE_URL='http://dev.virtualearth.net/REST/v1/Locations'
DETA_KEY = 'Your DETA key'

Add the .env file to the .gitignore. This procedure ensures the file is inacessible to others and that the API keys do not inccur in additional costs.

Note: It is especially important to ensure that the variables in the .env file are named as demonstrated in the code above. This specific name aligns with the Settings class in the functions/utils.py file, which is a specialization of the BaseSettings from the pydantic-settings package to load the environment variables.

It is recommended to create a separate environment designated for this project to avoid conflicts between packages and dependencies. It is also necessary to install in the project environment the packages within the requirements files. The type of requirements depend on your computer.

requirements.txt: If you are using Windows.

requirementsb.txt: If you are using a Mac. 

After ensuring all of these elements are satisfied, the project is set up.

Usage

All features were implemented such that someone can use this project project for the following tasks:

  1. Get Restaurant Recommendations: Users can discover new dining experiences recommended by Filomena, the smart Virtual Assistant. These recommendations are based on conversation with the user about their preferences, or given their food personality.

  2. Search for Restaurants: Users are also provided with a search engine that can filter restaurants by their location, cuisine, style, price range, and specific food elements.

  3. Gain Interesting Insights: Users can utilize the Analytics Dashboard to gain interesting insights into local restaurants, including the number of establishments, prevalent cuisine types, and average pricing, based on general data and/or current location.

  4. Have some fun with the Questionnaire: Users can determine their food personality by filling in a simple questionnaire referring to their dining tendencies and preferences.

  5. Simulate Reservations: Reservations can be simulated through the app, whereas it is only possible to proceed with it if the fields of the reservation align with the restaurant's schedules and table capacity.

  6. Read Blog Entries and Testimonials: The app and website are populated with blog entries about FlavourFlix and culinary experiences.

  7. Learn with Filomena: Filomena not only provides with recommendations, but is also able to determine the user's food personality if prompted, as answer questions about FlavourFlix and the gastronomic culture of Portugal.

For examples on how to, namely, effectively use the Filomena page please refer to the Use Cases and Prompt Templates

Authors

  • Carolina Shaul - Project Management and Development, with most focus building the application back-end and the Filomena ChatBot.
  • Madalena Frango - Project Development, focusing the most on building the app and creating all the marketing tools such as FlavourFlix' Instagram and website.
  • Bruno Moreira - Project Development, mostly by generating the appropriate data through distinct tools and ensuring its validity.
  • Guilherme Carriço - Project Development mostly focused on data exploration and cleaning, as well as building machine learning models.

Acknowledgements

About

Capstone Project 2023


Languages

Language:Python 67.5%Language:Jupyter Notebook 30.0%Language:HTML 2.5%