Update app.py
Browse files
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 |
-
|
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(
|
109 |
-
win_rate_table = generate_table(
|
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():
|