Skip to content

This app helps you automatically detect and count products in your pantry. It uses Gemini Vision Pro API. But it does not add just anything. Rather, it only consider your products.

License

Notifications You must be signed in to change notification settings

taeefnajib/Pantry-Tracker-React-App-Using-Gemini-Vision-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pantry Tracker Using React and Gemini Vision Pro

Pantry Tracker Screenshot

This app lets you add your products and look for those products in your patry using AI. It also counts the number of products it sees. The frontend is made using React and the backend is made using FastAPI.

How to Install

Pre-requisite

  1. Clone this repo
  2. Create an API to use Gemini at Google AI Studio
  3. Ensure you have Python, pip, node installed on your machine

Backend

  1. In your root folder, run cd Backend
  2. Create a virtual environment and activate it
  3. Create an .env file (see the env-template.txt file) and add your GOOGLE_API_KEY
  4. Install dependencies running pip install -r requirements.txt
  5. Finally run the server using uvicorn main:app --host 0.0.0.0 --port 8000 At http://0.0.0.0/8000 you'll see the server running

Frontend

  1. Deactivate the virtual environment.
  2. Go back to root folder running cd ..
  3. Enter Frontend folder running cd Frontend
  4. Run npm install and it will create the folder node_modules and the file package-lock.json
  5. Finally, run npm run dev You'll see the app running at http://localhost:5173

How to Use

On your React App, add product, e.g, Phone and click on +Add Product. You'll see the product added to the Pantry Inventory. The quanitity will be 0. Now click on Open Camera and it will open your machine's camera. Bring a mobile phone in front of the camera and click on Capture. After a couple of seconds, you'll see the quantity of Mobile Phone to be 1 instead of 0. In this way, you can add as many product as you want and count it using this app.

About

This app helps you automatically detect and count products in your pantry. It uses Gemini Vision Pro API. But it does not add just anything. Rather, it only consider your products.

Topics

Resources

License

Stars

Watchers

Forks