Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,8 +34,21 @@ else:
|
|
| 34 |
|
| 35 |
client = qdrant_client.QdrantClient(location=":memory:")
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
vector_store = QdrantVectorStore(
|
| 38 |
-
|
| 39 |
client=client,
|
| 40 |
vector_field="embedding",
|
| 41 |
enable_hybrid=True,
|
|
|
|
| 34 |
|
| 35 |
client = qdrant_client.QdrantClient(location=":memory:")
|
| 36 |
|
| 37 |
+
collection_name = "paper"
|
| 38 |
+
|
| 39 |
+
client.recreate_collection(
|
| 40 |
+
collection_name=collection_name,
|
| 41 |
+
vectors_config=models.VectorParams(
|
| 42 |
+
size=1536,
|
| 43 |
+
distance=models.Distance.COSINE,
|
| 44 |
+
),
|
| 45 |
+
|
| 46 |
+
optimizers_config=models.OptimizersConfigDiff(
|
| 47 |
+
indexing_threshold=20000,
|
| 48 |
+
)
|
| 49 |
+
)
|
| 50 |
vector_store = QdrantVectorStore(
|
| 51 |
+
collection_name="paper",
|
| 52 |
client=client,
|
| 53 |
vector_field="embedding",
|
| 54 |
enable_hybrid=True,
|