Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,15 +39,14 @@ else:
|
|
39 |
# Set up the Qdrant vector store (using an in-memory collection for simplicity)
|
40 |
|
41 |
client = qdrant_client.QdrantClient(location=":memory:")
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
distance=models.Distance.COSINE
|
49 |
-
)
|
50 |
)
|
|
|
51 |
vector_store = QdrantVectorStore(
|
52 |
collection_name="paper",
|
53 |
client=client,
|
|
|
39 |
# Set up the Qdrant vector store (using an in-memory collection for simplicity)
|
40 |
|
41 |
client = qdrant_client.QdrantClient(location=":memory:")
|
42 |
+
|
43 |
+
client.create_collection(
|
44 |
+
collection_name='paper',
|
45 |
+
vectors_config=models.VectorParams(
|
46 |
+
size=1536,
|
47 |
+
distance=models.Distance.COSINE
|
|
|
|
|
48 |
)
|
49 |
+
)
|
50 |
vector_store = QdrantVectorStore(
|
51 |
collection_name="paper",
|
52 |
client=client,
|