Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ rerank_models = [
|
|
27 |
]
|
28 |
|
29 |
collection_name = "trec_covid"
|
30 |
-
qdrant_url = os.getenv("
|
31 |
|
32 |
# =====================
|
33 |
# LOAD DATA
|
@@ -163,7 +163,7 @@ def evaluate_metrics(results_data, qrels_dict, k_values):
|
|
163 |
# =====================
|
164 |
|
165 |
def encode_and_upload():
|
166 |
-
client = QdrantClient(url=qdrant_url, api_key=os.getenv("
|
167 |
|
168 |
for embedding_model in embedding_models:
|
169 |
print(f"Encoding corpus with embedding model {embedding_model} ...")
|
@@ -346,7 +346,7 @@ print(f"Average relevant docs per query: {avg_relevant_docs:.2f}")
|
|
346 |
# --------------------
|
347 |
# CONFIG
|
348 |
# --------------------
|
349 |
-
QDRANT_URL = os.getenv("
|
350 |
EMBEDDING_MODEL = "all-MiniLM-L6-v2"
|
351 |
MAPPING_FILE = "int_to_doc_id.pkl"
|
352 |
# --------------------
|
|
|
27 |
]
|
28 |
|
29 |
collection_name = "trec_covid"
|
30 |
+
qdrant_url = os.getenv("QDRANT_URL", "http://localhost:6333")k_values = [1, 3, 5, 10, 20]
|
31 |
|
32 |
# =====================
|
33 |
# LOAD DATA
|
|
|
163 |
# =====================
|
164 |
|
165 |
def encode_and_upload():
|
166 |
+
client = QdrantClient(url=qdrant_url, api_key=os.getenv("QDRANT_API_KEY"))
|
167 |
|
168 |
for embedding_model in embedding_models:
|
169 |
print(f"Encoding corpus with embedding model {embedding_model} ...")
|
|
|
346 |
# --------------------
|
347 |
# CONFIG
|
348 |
# --------------------
|
349 |
+
QDRANT_URL = os.getenv("QDRANT_URL", "http://localhost:6333")COLLECTION_NAME = "trec_covid"
|
350 |
EMBEDDING_MODEL = "all-MiniLM-L6-v2"
|
351 |
MAPPING_FILE = "int_to_doc_id.pkl"
|
352 |
# --------------------
|