tttoaster commited on
Commit
98e0fb3
1 Parent(s): 43a97f8

Upload 14 files

Browse files
Files changed (2) hide show
  1. app.py +4 -0
  2. file/SEED-Bench-1.json +0 -0
app.py CHANGED
@@ -43,6 +43,8 @@ def prediction_analyse(prediction_content):
43
  print(f"Warning: Skipping invalid JSON data in line: {prediction}")
44
  continue
45
  question_id = prediction["question_id"]
 
 
46
  gt_item = ground_truth[question_id]
47
  question_type_id = gt_item["question_type_id"]
48
 
@@ -79,6 +81,8 @@ def prediction_analyse_v2(prediction_content):
79
  print(f"Warning: Skipping invalid JSON data in line: {prediction}")
80
  continue
81
  question_id = prediction["question_id"]
 
 
82
  gt_item = ground_truth[question_id]
83
  question_type_id = gt_item["question_type_id"]
84
 
 
43
  print(f"Warning: Skipping invalid JSON data in line: {prediction}")
44
  continue
45
  question_id = prediction["question_id"]
46
+ if question_id not in ground_truth:
47
+ continue
48
  gt_item = ground_truth[question_id]
49
  question_type_id = gt_item["question_type_id"]
50
 
 
81
  print(f"Warning: Skipping invalid JSON data in line: {prediction}")
82
  continue
83
  question_id = prediction["question_id"]
84
+ if question_id not in ground_truth:
85
+ continue
86
  gt_item = ground_truth[question_id]
87
  question_type_id = gt_item["question_type_id"]
88
 
file/SEED-Bench-1.json CHANGED
The diff for this file is too large to render. See raw diff