Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -336,6 +336,8 @@ chat_history = [
|
|
336 |
("Can you tell me another joke?", "Why don't scientists trust atoms? Because they make up everything!"),
|
337 |
]
|
338 |
|
|
|
|
|
339 |
|
340 |
def generate_response(user_input, model_id):
|
341 |
try:
|
@@ -348,8 +350,6 @@ def generate_response(user_input, model_id):
|
|
348 |
query_vector = bertmodel.encode(user_input).reshape(1, -1).astype("float32")
|
349 |
D, I = index.search(query_vector, 1)
|
350 |
|
351 |
-
load_document_store()
|
352 |
-
|
353 |
# Retrieve document
|
354 |
retrieved_id = I[0][0]
|
355 |
retrieved_knowledge = (
|
|
|
336 |
("Can you tell me another joke?", "Why don't scientists trust atoms? Because they make up everything!"),
|
337 |
]
|
338 |
|
339 |
+
|
340 |
+
load_document_store()
|
341 |
|
342 |
def generate_response(user_input, model_id):
|
343 |
try:
|
|
|
350 |
query_vector = bertmodel.encode(user_input).reshape(1, -1).astype("float32")
|
351 |
D, I = index.search(query_vector, 1)
|
352 |
|
|
|
|
|
353 |
# Retrieve document
|
354 |
retrieved_id = I[0][0]
|
355 |
retrieved_knowledge = (
|