Aniruddhan15 / NUTRITION_APP-USING-GEMINI-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NUTRITION_APP-USING-GEMINI-API

Complete Grandeur End to End AI Nutrional Assistant App from scratch till deployment

Overview

The AI Nutrition App is designed to help users maintain a balanced and personalized diet tailored to their unique health goals and dietary preferences.
Leveraging AI technology, the app provides customized meal plans, accurate nutritional analysis, and expert guidance to enhance users' overall health and well-being.

Objective

Our goal is to create an AI-driven nutrition app that simplifies the process of eating healthier by offering personalized meal plans, easy food tracking, and reliable nutritional information.

Impact

Solving this problem will: Improve users' overall health and well-being by providing tailored nutrition plans.
Save users time and effort in tracking their food intake and planning meals.
Enhance users' ability to make informed dietary choices with access to reliable nutritional information.
Increase users' motivation and adherence to healthy eating habits through continuous support and guidance.

Proposed Solution

AI Integration: Utilize AI to generate personalized meal plans and provide accurate nutritional analysis.
Data-Driven Recommendations: Incorporate reliable and scientifically-backed nutritional data to inform users.

Usage Examples

Sample 1

WhatsApp Image 2024-07-10 at 12 00 54_3ff2be55

Sample 2

WhatsApp Image 2024-07-10 at 12 00 55_4d1e7227

Step by Step Installation

0.Prerequisites

Python 3.x
AIStudio Account
Streamlit - UI
An internet connection for API calls and hosting the app

1.Clone the repository:

AI Nutrition App

Clone the Repository

To clone the repository, use the following command:


git clone https://github.com/keerthikrish10/NUTRITION_APP-USING-GEMINI-API.git

Copy


git clone https://github.com/Aniruddhan15/NUTRITION_APP-USING-GEMINI-API.git

Copy

2.Navigate to the project directory:

cd ai-nutrition-app

3.Install the required libraries:


pip install -r requirements.txt

4.Set up your Google API Key and other environment variables as needed.

Obtain an API key from makersuite google for gemini pro vision api key:
Visit the AI Studio website (https://aistudio.google.com/app/apikey) and sign up in order to obtain the API key access.
Follow the instructions provided by AI studio Google to obtain an API key.
Copy the API key as you will need it in the next step.
Add your API key to the app.py file:
Open the app.py file in a text editor.
Locate the line that says genai.api_key = 'YOUR_API_KEY'.
Replace 'YOUR_API_KEY' with the API key you obtained from AIStudio.
Save the app.py file.

Alternative/ Best option:

Create a ".env" file to your environment and add your api key as google_api_key="(Put Your api key, please dont forget to include as a string)"
use the below code:


from dotenv import load_dotenv
load_dotenv()
genai.configure(api_key=os.getenv("google_api_key"))

5.Run the application:

python app.py

6.Access the app

To start Streamlit web browser, use the following command:


streamlit run app.py

You can view your web browser at (http://localhost:5000) (or http://127.0.0.1:5000) or at a recommended browser link in the comman prompt console.
Register your desired meal picture and a prompt about it start receiving personalized meal plans and tracking your nutrition.

Contributing

We welcome contributions to enhance the AI Nutrition App. Please fork the repository, create a new branch for your feature or bug fix, and submit a pull request. Make sure to follow our coding guidelines and include appropriate tests.

Contributing Guidelines

Fork the repository.Create a new branch.


git checkout -b feature-branch

Make your changes. Commit your changes.


git commit -am 'Add new feature'

Push to the branch


git push origin feature-branch

Create a new Pull Request.

License

Apache License
Version 2.0, January 2004

Acknowledgements

We would like to thank all contributors and the open-source community for their valuable inputs and support.

Contact:

Keerthi Krishna : skeerthi.krish@gmail.com
Aniruddhan N : aniruddhan26@gmail.com

About

License:Apache License 2.0


Languages

Language:Python 100.0%