Update app.py
Browse files
app.py
CHANGED
|
@@ -378,11 +378,11 @@ def gen_qa_who(df):
|
|
| 378 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 379 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 380 |
if rouge_l_score >= threshold:
|
| 381 |
-
verification_status = 'Verified Valid'
|
| 382 |
elif rouge_l_score == 0:
|
| 383 |
verification_status = 'Not verifiable'
|
| 384 |
else:
|
| 385 |
-
verification_status = 'Verified False'
|
| 386 |
rouge_l_scores.append(verification_status)
|
| 387 |
except:
|
| 388 |
pass
|
|
@@ -439,11 +439,11 @@ def gen_qa_what(df):
|
|
| 439 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 440 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 441 |
if rouge_l_score >= threshold:
|
| 442 |
-
verification_status = 'Verified Valid'
|
| 443 |
elif rouge_l_score == 0:
|
| 444 |
verification_status = 'Not verifiable'
|
| 445 |
else:
|
| 446 |
-
verification_status = 'Verified False'
|
| 447 |
rouge_l_scores.append(verification_status)
|
| 448 |
except:
|
| 449 |
pass
|
|
@@ -500,11 +500,11 @@ def gen_qa_why(df):
|
|
| 500 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 501 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 502 |
if rouge_l_score >= threshold:
|
| 503 |
-
verification_status = 'Verified Valid'
|
| 504 |
elif rouge_l_score == 0:
|
| 505 |
verification_status = 'Not verifiable'
|
| 506 |
else:
|
| 507 |
-
verification_status = 'Verified False'
|
| 508 |
rouge_l_scores.append(verification_status)
|
| 509 |
except:
|
| 510 |
pass
|
|
@@ -561,11 +561,11 @@ def gen_qa_when(df):
|
|
| 561 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 562 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 563 |
if rouge_l_score >= threshold:
|
| 564 |
-
verification_status = 'Verified Valid'
|
| 565 |
elif rouge_l_score == 0:
|
| 566 |
verification_status = 'Not verifiable'
|
| 567 |
else:
|
| 568 |
-
verification_status = 'Verified False'
|
| 569 |
rouge_l_scores.append(verification_status)
|
| 570 |
except:
|
| 571 |
pass
|
|
@@ -622,11 +622,11 @@ def gen_qa_where(df):
|
|
| 622 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 623 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 624 |
if rouge_l_score >= threshold:
|
| 625 |
-
verification_status = 'Verified Valid'
|
| 626 |
elif rouge_l_score == 0:
|
| 627 |
verification_status = 'Not verifiable'
|
| 628 |
else:
|
| 629 |
-
verification_status = 'Verified False'
|
| 630 |
rouge_l_scores.append(verification_status)
|
| 631 |
except:
|
| 632 |
pass
|
|
|
|
| 378 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 379 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 380 |
if rouge_l_score >= threshold:
|
| 381 |
+
verification_status = 'βοΈVerified Valid'
|
| 382 |
elif rouge_l_score == 0:
|
| 383 |
verification_status = 'Not verifiable'
|
| 384 |
else:
|
| 385 |
+
verification_status = 'βVerified False'
|
| 386 |
rouge_l_scores.append(verification_status)
|
| 387 |
except:
|
| 388 |
pass
|
|
|
|
| 439 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 440 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 441 |
if rouge_l_score >= threshold:
|
| 442 |
+
verification_status = 'βοΈVerified Valid'
|
| 443 |
elif rouge_l_score == 0:
|
| 444 |
verification_status = 'Not verifiable'
|
| 445 |
else:
|
| 446 |
+
verification_status = 'βVerified False'
|
| 447 |
rouge_l_scores.append(verification_status)
|
| 448 |
except:
|
| 449 |
pass
|
|
|
|
| 500 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 501 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 502 |
if rouge_l_score >= threshold:
|
| 503 |
+
verification_status = 'βοΈVerified Valid'
|
| 504 |
elif rouge_l_score == 0:
|
| 505 |
verification_status = 'Not verifiable'
|
| 506 |
else:
|
| 507 |
+
verification_status = 'βVerified False'
|
| 508 |
rouge_l_scores.append(verification_status)
|
| 509 |
except:
|
| 510 |
pass
|
|
|
|
| 561 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 562 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 563 |
if rouge_l_score >= threshold:
|
| 564 |
+
verification_status = 'βοΈVerified Valid'
|
| 565 |
elif rouge_l_score == 0:
|
| 566 |
verification_status = 'Not verifiable'
|
| 567 |
else:
|
| 568 |
+
verification_status = 'βVerified False'
|
| 569 |
rouge_l_scores.append(verification_status)
|
| 570 |
except:
|
| 571 |
pass
|
|
|
|
| 622 |
list_of_pairs = [(answer_evidence, answer[j])]
|
| 623 |
rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
|
| 624 |
if rouge_l_score >= threshold:
|
| 625 |
+
verification_status = 'βοΈVerified Valid'
|
| 626 |
elif rouge_l_score == 0:
|
| 627 |
verification_status = 'Not verifiable'
|
| 628 |
else:
|
| 629 |
+
verification_status = 'βVerified False'
|
| 630 |
rouge_l_scores.append(verification_status)
|
| 631 |
except:
|
| 632 |
pass
|