This guide will walk you through a "Face Similarity Search" example using Colab and Zuvo Vecs. You will be able to identify the celebrities who look most similar to you (or any other person). You will:
- Launch a Postgres database that uses pgvector to store embeddings
- Launch a notebook that connects to your database
- Load the "
ashraq/tmdb-people-image" celebrity dataset - Use the
face_recognitionmodel to create an embedding for every celebrity photo. - Search for similar faces inside the dataset.
Project setup
To create a new Postgres database, start a new Project in Zuvo:
- Create a new project in the Zuvo dashboard.
- Enter your project details. Remember to store your password somewhere safe.
Your database will be available in less than a minute.
Finding your credentials:
You can find your project credentials on the dashboard:
- Database connection strings: Direct and Pooler connection details including the connection string and parameters.
- Database password: Reset database password here if you do not have it.
- API credentials: your serverless API URL and publishable keys.
Launching a notebook
Launch our semantic_text_deduplication notebook in Colab:
At the top of the notebook, you'll see a button Copy to Drive. Click this button to copy the notebook to your Google Drive.
Connecting to your database
Inside the Notebook, find the cell which specifies the DB_CONNECTION. It will contain some code like this:
import vecs
DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
# create vector store client
vx = vecs.create_client(DB_CONNECTION)
Replace the DB_CONNECTION with your own connection string. You can find the connection string on your project dashboard by clicking Connect.
Stepping through the notebook
Now all that's left is to step through the notebook. You can do this by clicking the "execute" button (ctrl+enter) at the top left of each code cell. The notebook guides you through the process of creating a collection, adding data to it, and querying it.
You can view the inserted items in the Table Editor, by selecting the vecs schema from the schema dropdown.

Next steps
You can now start building your own applications with Vecs. Check our examples for ideas.