Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -108,9 +108,9 @@ def upload_document(file):
|
|
108 |
return "Document uploaded and indexed successfully."
|
109 |
|
110 |
# ===============================
|
111 |
-
# GENERATION PIPELINE
|
112 |
# ===============================
|
113 |
-
|
114 |
|
115 |
def generate_answer_from_file(query, top_k=10):
|
116 |
if not document_texts:
|
|
|
108 |
return "Document uploaded and indexed successfully."
|
109 |
|
110 |
# ===============================
|
111 |
+
# GENERATION PIPELINE
|
112 |
# ===============================
|
113 |
+
query_vector = get_embeddings(query, is_query=True).astype("float32")
|
114 |
|
115 |
def generate_answer_from_file(query, top_k=10):
|
116 |
if not document_texts:
|