Inspiration

We were attracted by the challenge presented by Marshall Wace : Bridging Worlds. We have friends in self-catered colleges who are always struggling to decide what to cook. So we decided to build this website to make life easier for them according to their current mood! We are bridging Psychology with Culinary with PsychEat!

What it does

It allows the user to input their moods in several ways, such as using a variety of mood sliders or simply a paragraph. The website sends this data to the integrated Google Gemini API, which, with the help of pre-existing general prompts set by the developers(us), recommends a dish to the user customised to their mood, keeping in mind dietary requirements and allergens entered by the user. It deeply considers the biological and psychological effects of the dish while recommending it to improve the user's mood.

How we built it

We began by establishing the basic file structure for our project (available on our GitHub repository). This structure primarily consists of HTML and CSS files, along with some JavaScript and Python files. Using Flask, we connected our Python backend with the HTML-CSS-JS frontend. We implemented a registration page and a login page to manage user information, specifically usernames and passwords. We then integrated the Gemini API through Flask. Our JavaScript captures user input, sends it to the Flask backend, which then forwards it to the AI API for processing. The response from the API is received by Flask and displayed on the frontend, again by using JavaScript throughout this process. Finally, we applied CSS styling across all our webpages to ensure a consistent and visually appealing interface, as reflected in the files available on our repository. To be able to use this entire workflow in the browser without the terminal always running, we connected our repository to Render, which helped us generate an independent URL for our website, along with the Python files working with it.
We also use the PostgreSQL feature on Render to add a database to our website so that the user login information can be permanently stored for future reference and logins.

Challenges we ran into

1. Since we were using flask(python) along with frondend HTML and CSS, we were unable to generate an independent URL link for it, in a way that we dont need to run the python file each time before generating the link for the website in the terminal 2. We struggled to permanently store user-login details for future logins.
( we used Chatgpt to understand and overcome these challenges )

Accomplishments that we're proud of

1. We accomplished an independent URL for our website by connecting our repository to Render 2. We made an independent database for our project using PostgreSQL to store user-login information permanently. 3. We managed to successfully integrate a Google Gemini API in our project and use it well.

What we learned

1. We learned how to integrate APIs into web projects 2. We learned how to use Render to generate URLs for web projects that use HTML, CSS along with python(flask) backend 3. We learned how to create databases

What's next for PsychEat

1. Be able to keep track of the user's history (eg. dishes, moods, recipes) 2. Integrate daily mood trackers in the form of graphs 3. add more customizations 4. Create an app for it for easy access

Built With

Share this project:

Updates

Submission history