luulinh90s
commited on
Commit
·
0ec0371
1
Parent(s):
f395837
update
Browse files
app.py
CHANGED
@@ -327,14 +327,20 @@ def completed(session_id):
|
|
327 |
logger.info(f"ground_truth_key: {ground_truth_key}")
|
328 |
|
329 |
if ground_truth_key in ground_truth:
|
330 |
-
|
|
|
|
|
|
|
331 |
if user_prediction.upper() == model_prediction:
|
332 |
-
correct_predictions += 1
|
333 |
-
|
334 |
-
if user_prediction.upper() == "TRUE":
|
335 |
true_predictions += 1
|
336 |
-
|
337 |
false_predictions += 1
|
|
|
|
|
|
|
|
|
|
|
338 |
else:
|
339 |
logger.warning(f"Missing key in ground truth: {ground_truth_key}")
|
340 |
|
|
|
327 |
logger.info(f"ground_truth_key: {ground_truth_key}")
|
328 |
|
329 |
if ground_truth_key in ground_truth:
|
330 |
+
# TODO: Important Note ->
|
331 |
+
# Using model prediction as we are doing forward simulation
|
332 |
+
# Please use ground_truth[ground_truth_key]['answer'].upper() if running verification task
|
333 |
+
model_prediction = ground_truth[ground_truth_key]['prediction'].upper()
|
334 |
if user_prediction.upper() == model_prediction:
|
335 |
+
# correct_predictions += 1
|
|
|
|
|
336 |
true_predictions += 1
|
337 |
+
else:
|
338 |
false_predictions += 1
|
339 |
+
|
340 |
+
# if user_prediction.upper() == "TRUE":
|
341 |
+
# true_predictions += 1
|
342 |
+
# elif user_prediction.upper() == "FALSE":
|
343 |
+
# false_predictions += 1
|
344 |
else:
|
345 |
logger.warning(f"Missing key in ground truth: {ground_truth_key}")
|
346 |
|