Update app.py
Browse files
app.py
CHANGED
@@ -411,10 +411,20 @@ if claim_text and evidence_text:
|
|
411 |
else:
|
412 |
list_misc.append(item)
|
413 |
lists = [list_who, list_when, list_why, list_where, list_what]
|
414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
for i in range(len(lists)):
|
416 |
if not lists[i]:
|
417 |
lists[i].extend([["No claims", "", f"No mention of '{['who', 'when', 'why', 'where', 'what'][i]}' in any related documents.", "❔ Not verifiable"]])
|
|
|
418 |
|
419 |
final_df = pd.DataFrame(columns=['Who Claims', 'What Claims', 'When Claims', 'Where Claims', 'Why Claims', 'Misc Claims'])
|
420 |
|
|
|
411 |
else:
|
412 |
list_misc.append(item)
|
413 |
lists = [list_who, list_when, list_why, list_where, list_what]
|
414 |
+
for j, lst in enumerate(lists):
|
415 |
+
for i, l in enumerate(lst):
|
416 |
+
if l: # check if list is not empty
|
417 |
+
l[0] = f"Q{i+1}: {l[0]}"
|
418 |
+
l[1] = f"Claim:- {l[1]}"
|
419 |
+
if l[2]:
|
420 |
+
l[2] = f"answer retrieved from evidence:- {l[2]}"
|
421 |
+
else:
|
422 |
+
l[2] = f"answer retrieved from evidence:- No mention of '{['who', 'when', 'why', 'where', 'what'][j]}' in any related documents."
|
423 |
+
|
424 |
for i in range(len(lists)):
|
425 |
if not lists[i]:
|
426 |
lists[i].extend([["No claims", "", f"No mention of '{['who', 'when', 'why', 'where', 'what'][i]}' in any related documents.", "❔ Not verifiable"]])
|
427 |
+
|
428 |
|
429 |
final_df = pd.DataFrame(columns=['Who Claims', 'What Claims', 'When Claims', 'Where Claims', 'Why Claims', 'Misc Claims'])
|
430 |
|