Fashion Buddy is a multimodal RAG application powered by DataStax Astra DB which performs a similarity search on the clothing worth in a users image.
- An Astra DB account. You can create one here.
- An Astra Vector Database
- A GoogleAI account and API Key create one here
- A Cohere account and api key create one here
- Clone this repository to your local machine.
- Install the dependencies by running
npm install
in your terminal. - Set up the following environment variables in your IDE or
.env
file:GOOGLE_API_KEY
: api key from GoogleASTRA_DB_ENDPOINT
: Your Astra DB vector database endpoint- Copy from the
Database Detail
- Copy from the
ASTRA_DB_APPLICATION_TOKEN
: The generated app token for your Astra database- To create a new token go to your database's
Connect
tab and clickGenerate Token
. (your Application Token begins withAstraCS:...
)
- To create a new token go to your database's
This app uses a sample dataset of Zara clothing from Kaggle
Run npm run load
to load the dataset. This can take a long time so run it as long as you see fit (there will be failures mainly due to items that are no longer active).
This step calls Gemini with each product image and gets an item description to embed and add to your collection.
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
You can easily deploy your chatbot to Vercel by clicking the button below:
Remember to set your environment variables to the values obtained when setting up your Astra DB and Google accounts.