aelitta commited on
Commit
74efca5
1 Parent(s): e779493

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -35,12 +35,14 @@ Helpful answer:
35
 
36
  embeddings = SentenceTransformerEmbeddings(model_name="NeuML/pubmedbert-base-embeddings")
37
 
38
- url = "http://127.0.0.1:6333"
39
 
40
- #qdrant_api_key = os.environ['QDRANT_API_KEY']
41
- #url = os.environ['QDRANT_URL']
42
 
43
- client = QdrantClient(url=url, prefer_grpc=False)
 
 
44
  db = Qdrant(client=client, embeddings=embeddings, collection_name="vector_db")
45
 
46
  retriever = db.as_retriever(search_kwargs={"k":1})
 
35
 
36
  embeddings = SentenceTransformerEmbeddings(model_name="NeuML/pubmedbert-base-embeddings")
37
 
38
+ # url = "http://127.0.0.1:6333"
39
 
40
+ qdrant_api_key = 'ic_WPSW7zUEOYzJIbHAYKVUxTf7xVXxFfJgTN6UsnvcuXGwkRPGx3g'
41
+ qdrant_url = 'https://ea51a65a-6fad-48ce-b571-846d3b496882.us-east4-0.gcp.cloud.qdrant.io'
42
 
43
+ client = QdrantClient(url=qdrant_url,
44
+ port=6333,
45
+ api_key=qdrant_api_key, prefer_grpc=False)
46
  db = Qdrant(client=client, embeddings=embeddings, collection_name="vector_db")
47
 
48
  retriever = db.as_retriever(search_kwargs={"k":1})