Skip to content

MurungaOwen/python-vector-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title app_file sdk sdk_version
vector-search-hood
main.py
gradio
4.42.0

vector search using hugging face semantic search, MongoDb and python

setup

    pip install -r requirements.txt

create an account in hugging face and get acces token to store in .env file

Go to mongo db Atlas and setup the database and copy the mongo uri

add search vector and edit in json in mongo search

{
  "mappings": {
    "dynamic": true,
    "fields": {
      "plot_embedding": {
        "dimensions": 384, //dimension gotten from size of array of the embedding from hugging face
        "similarity": "dotProduct",
        "type": "knnVector"
      }
    }
  }
}

Run

run the functions as follows

python main.py

"Workings"

About

semantic search and vector search using pymongo, mongodb and hugging face

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages