Spaces:
Running
Running
A newer version of the Gradio SDK is available:
4.44.0
metadata
title: Whatscooking Advisor
emoji: ⚡
colorFrom: indigo
colorTo: red
sdk: gradio
sdk_version: 4.37.2
app_file: app.py
pinned: false
license: apache-2.0
This simple restaurant planner is designed to communicate with MongoDB Atlas Vector Search with the loaded Restaurant data set.
It uses OpenAI small text embeddings (256 dimesnsions) to query the database for semantic similarity search.
How to setup your own
- Create an Atlas cluter (free clusters are available)
- Load the dataset using the
ingest.py
script with your connection string. - Deploy the relevant Vector Index on
whatscooking.smart_trips
aggregated collection "name" :vector_index
.
{
"fields": [
{
"numDimensions": 256,
"path": "embedding",
"similarity": "cosine",
"type": "vector"
},
{
"path": "searchTrip",
"type": "filter"
}
]
}
Create a 2dsphere index on restaurants
collection to allow geo queries on location.coordinates
:
db.restaurants.createIndex({'location.coordinates' : "2dsphere"})
- Whitelist access from everywhere (
0.0.0.0/0
) - Locate your cluster connection URI
- Obtain your Open AI api key
- "Duplicate" this space and input
MONGODB_ATLAS_CLUSTER_URI
- Your Atlas Cluster connection stringOPENAI_API_KEY
- Open AI API key
Build and use the planner!