cooelf commited on
Commit
8a84829
1 Parent(s): a09d766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -178,7 +178,7 @@ def inference(context, question, reference):
178
 
179
  na_score = (0.5*cls_divide + 0.5*score_diff)*0.5
180
  if na_score > thresh:
181
- final_answer = "<No Answer>. The question is not answerable according to the context."
182
  else:
183
  final_answer = nbest[0]["text"]
184
  return final_answer
 
178
 
179
  na_score = (0.5*cls_divide + 0.5*score_diff)*0.5
180
  if na_score > thresh:
181
+ final_answer = f"<No Answer>. The question is not answerable according to the context. If you want to force me to answer, then the plausable answer is {nbest[0]['text']}"
182
  else:
183
  final_answer = nbest[0]["text"]
184
  return final_answer