Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
41 |
-
|
42 |
|
43 |
-
client = QdrantClient(url=
|
|
|
|
|
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})
|