Towhidul commited on
Commit
2b3902b
·
1 Parent(s): 60bffb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -361,11 +361,12 @@ def gen_qa_who(df):
361
  input_evidence = f"answer_the_next_question_from_context: {question_ids} context: {evidence}"
362
  #time.sleep(10)
363
  answer_evidence = query_evidence({"inputs":input_evidence,"truncation":True,"wait_for_model":True}) #[0]['generated_text']
364
- if answer_evidence.lower() in evidence.lower():
365
- list_of_evidence_answer_who.append(f"""Evidence{j+1}:{answer_evidence}""")
366
- else:
367
- answer_evidence=""
368
- list_of_evidence_answer_who.append(f"""No mention of 'who'in any related documents.""")
 
369
  threshold = 0.2
370
  list_of_pairs = [(answer_evidence, answer[j])]
371
  rouge_l_score = calc_rouge_l_score(answer_evidence, answer[j])
 
361
  input_evidence = f"answer_the_next_question_from_context: {question_ids} context: {evidence}"
362
  #time.sleep(10)
363
  answer_evidence = query_evidence({"inputs":input_evidence,"truncation":True,"wait_for_model":True}) #[0]['generated_text']
364
+ # if answer_evidence.lower() in evidence.lower():
365
+ # list_of_evidence_answer_who.append(f"""Evidence{j+1}:{answer_evidence}""")
366
+ # else:
367
+ # answer_evidence=""
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])