Update app.py
Browse files
app.py
CHANGED
@@ -368,15 +368,15 @@ def gen_qa_who(df):
|
|
368 |
# list_of_evidence_answer_who.append(f"""No mention of 'who'in any related documents.""")
|
369 |
list_of_evidence_answer_who.append(f"""Evidence{j+1}:{answer_evidence}""")
|
370 |
threshold = 0.2
|
371 |
-
list_of_pairs = [(answer_evidence, answer[j])]
|
372 |
-
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
373 |
-
if rouge_l_score >= threshold:
|
374 |
-
|
375 |
-
elif rouge_l_score == 0:
|
376 |
-
|
377 |
-
else:
|
378 |
-
|
379 |
-
rouge_l_scores.append(verification_status)
|
380 |
# except:
|
381 |
# pass
|
382 |
else:
|
@@ -384,7 +384,7 @@ def gen_qa_who(df):
|
|
384 |
list_of_ans_who=""
|
385 |
list_of_evidence_answer_who="No mention of 'who'in any related documents."
|
386 |
rouge_l_scores="Not verifiable"
|
387 |
-
return list_of_ques_who,list_of_ans_who,
|
388 |
#------------------------------------------------------------
|
389 |
|
390 |
def rephrase_question_what(question):
|
|
|
368 |
# list_of_evidence_answer_who.append(f"""No mention of 'who'in any related documents.""")
|
369 |
list_of_evidence_answer_who.append(f"""Evidence{j+1}:{answer_evidence}""")
|
370 |
threshold = 0.2
|
371 |
+
# list_of_pairs = [(answer_evidence, answer[j])]
|
372 |
+
# rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
373 |
+
# if rouge_l_score >= threshold:
|
374 |
+
# verification_status = 'Verified Valid'
|
375 |
+
# elif rouge_l_score == 0:
|
376 |
+
# verification_status = 'Not verifiable'
|
377 |
+
# else:
|
378 |
+
# verification_status = 'Verified False'
|
379 |
+
# rouge_l_scores.append(verification_status)
|
380 |
# except:
|
381 |
# pass
|
382 |
else:
|
|
|
384 |
list_of_ans_who=""
|
385 |
list_of_evidence_answer_who="No mention of 'who'in any related documents."
|
386 |
rouge_l_scores="Not verifiable"
|
387 |
+
return list_of_ques_who,list_of_ans_who,list_of_evidence_answer_who
|
388 |
#------------------------------------------------------------
|
389 |
|
390 |
def rephrase_question_what(question):
|