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.
- Clone this repo
- Create an API to use Gemini at Google AI Studio
- Ensure you have Python, pip, node installed on your machine
- In your root folder, run
cd Backend
- Create a virtual environment and activate it
- Create an
.env
file (see theenv-template.txt
file) and add yourGOOGLE_API_KEY
- Install dependencies running
pip install -r requirements.txt
- 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
- Deactivate the virtual environment.
- Go back to root folder running
cd ..
- Enter
Frontend
folder runningcd Frontend
- Run
npm install
and it will create the foldernode_modules
and the filepackage-lock.json
- Finally, run
npm run dev
You'll see the app running at http://localhost:5173
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.