iloncka commited on
Commit
70b77e9
1 Parent(s): dfe41ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -123,7 +123,7 @@ def ask_question(question):
123
  "context": "..." + answer["context"] + "...",
124
  "answer": answer["answer"],
125
  "relevance": round(answer["score"] * 100, 2),
126
- "document": [doc for doc in response["documents"] if doc["id"] == answer["document_id"]][0],
127
  # "_raw": answer,
128
  "offset_start_in_doc": answer["offsets_in_document"][0]["start"],
129
  }
 
123
  "context": "..." + answer["context"] + "...",
124
  "answer": answer["answer"],
125
  "relevance": round(answer["score"] * 100, 2),
126
+ "document": [doc for doc in prediction["documents"] if doc["id"] == answer["document_id"]][0],
127
  # "_raw": answer,
128
  "offset_start_in_doc": answer["offsets_in_document"][0]["start"],
129
  }