JarvisKi commited on
Commit
97350a9
·
verified ·
1 Parent(s): 2b1053c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -101,12 +101,12 @@ def process_file(file_info):
101
  data_content = uploaded_file.read()
102
  uploaded_data_json = json.loads(data_content)
103
  # Merge the uploaded data
104
- new_data = merge_data(uploaded_data_json)
105
  scheduler.commit() # Trigger manual commit after processing
106
  # If we don't return anything here, gradio will not update the table
107
  # We need to return the new data for the table if it's interactive
108
- pass_rate_table = generate_table(new_data["SolvablePassRateScores"])[1]
109
- win_rate_table = generate_table(new_data["SolvableWinRateScores"])[1]
110
  return pass_rate_table, win_rate_table
111
 
112
  def refresh_table_data():
 
101
  data_content = uploaded_file.read()
102
  uploaded_data_json = json.loads(data_content)
103
  # Merge the uploaded data
104
+ existing_data = merge_data(uploaded_data_json)
105
  scheduler.commit() # Trigger manual commit after processing
106
  # If we don't return anything here, gradio will not update the table
107
  # We need to return the new data for the table if it's interactive
108
+ pass_rate_table = generate_table(existing_data["SolvablePassRateScores"])[1]
109
+ win_rate_table = generate_table(existing_data["SolvableWinRateScores"])[1]
110
  return pass_rate_table, win_rate_table
111
 
112
  def refresh_table_data():