Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|