Spaces:
Runtime error
Runtime error
Commit
·
b97ca50
1
Parent(s):
5c947fb
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ qa_model = pipeline("question-answering",'a-ware/bart-squadv2')
|
|
8 |
|
9 |
def fetch_answers(question, clincal_note ):
|
10 |
clincal_note_paragraphs = clincal_note.splitlines()
|
11 |
-
query_paragraph_list = [(question, para) for para in clincal_note_paragraphs ]
|
12 |
|
13 |
scores = passage_retreival_model.predict(query_paragraph_list)
|
14 |
top_5_indices = scores.argsort()[-5:]
|
|
|
8 |
|
9 |
def fetch_answers(question, clincal_note ):
|
10 |
clincal_note_paragraphs = clincal_note.splitlines()
|
11 |
+
query_paragraph_list = [(question, para) for para in clincal_note_paragraphs if len(para.strip()) > 0 ]
|
12 |
|
13 |
scores = passage_retreival_model.predict(query_paragraph_list)
|
14 |
top_5_indices = scores.argsort()[-5:]
|