diff --git a/application/app.py b/application/app.py index 73f860ea..bef2712f 100644 --- a/application/app.py +++ b/application/app.py @@ -136,7 +136,11 @@ def api_answer(): # some formatting for the frontend result['answer'] = result['result'] result['answer'] = result['answer'].replace("\\n", "
") - result['answer'] = result['answer'].replace("SOURCES:", "") + try: + result['answer'] = result['answer'].split("SOURCES:")[0] + except: + pass + # mock result # result = { # "answer": "The answer is 42", diff --git a/application/index.faiss b/application/index.faiss index f7f30d33..89ec710e 100644 Binary files a/application/index.faiss and b/application/index.faiss differ diff --git a/application/index.pkl b/application/index.pkl index 953e8957..82190faa 100644 Binary files a/application/index.pkl and b/application/index.pkl differ