mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
* feat: move storage settings * feat: redirect * feat: database settings in service area * feat: move data api settings * fix: revert data API placement * feat: minor UX touches * fix: simplify configuration group * feat: references to database settings * feat: references to storage settings * fix: redirects and formatting * fix: Import StorageMenu dynamically to avoid SSR issues with useLocalStorage * fix: move Data API closer to semantic siblings * fix: revert smart comma * Shift bucket sort logic into storage explorer store --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Image Search with Amazon Bedrock and Supabase Vector
In this example we're implementing image search using the Amazon Titan Multimodal Embeddings G1, a set of pre-trained high-performing image, multimodal, and text model, accessible via a fully managed API.
We're implementing two methods in the /image_search/main.py file:
- The
seedmethod generates embeddings for the images in theimagesfolder and upserts them into a collection in Supabase Vector. - The
searchmethod generates an embedding from the search query and performs a vector similarity search query.
Setup
- Install poetry:
pip install poetry - Activate the virtual environment:
poetry shell- (to leave the venv just run
exit)
- (to leave the venv just run
- Install app dependencies:
poetry install
Run locally
Generate the embeddings and seed the collection
supabase startpoetry run seed- Check the embeddings stored in the local Supabase Dashboard: http://localhost:54323/project/default/editor > schema: vecs
Perform a search
poetry run search "bike in front of red brick wall"
Run on hosted Supabase project
- Set
DB_CONNECTIONwith the connection string from your hosted Supabase Dashboard: https://supabase.com/dashboard/project/_/database/settings > Connection string > URI
Attributions
Models
Amazon Titan Multimodal Embeddings G1
Images
Images from https://unsplash.com/license via https://picsum.photos/