BreakLee commited on
Commit
fec9185
1 Parent(s): f7b2dd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -86,6 +86,7 @@ def add_new_eval(
86
  else:
87
  LLM_name = LLM_type
88
 
 
89
  if model_link == '':
90
  model_name = model_name_textbox # no url
91
  else:
@@ -112,9 +113,21 @@ def add_new_eval(
112
  overall_accuracy]
113
  # pdb.set_trace()
114
  csv_data = pd.read_csv(CSV_DIR)
115
- col = csv_data.shape[0]
116
- csv_data.loc[col] = new_data
117
- csv_data = csv_data.to_csv(CSV_DIR, index=False)
 
 
 
 
 
 
 
 
 
 
 
 
118
  return 0
119
 
120
  def get_baseline_df():
 
86
  else:
87
  LLM_name = LLM_type
88
 
89
+
90
  if model_link == '':
91
  model_name = model_name_textbox # no url
92
  else:
 
113
  overall_accuracy]
114
  # pdb.set_trace()
115
  csv_data = pd.read_csv(CSV_DIR)
116
+
117
+ # pdb.set_trace()
118
+ if revision_name_textbox == '':
119
+ col = csv_data.shape[0]
120
+ csv_data.loc[col] = new_data
121
+ csv_data = csv_data.to_csv(CSV_DIR, index=False)
122
+ else:
123
+ model_name_list = csv_data['Model']
124
+ name_list = [name.split(']')[0][1:] for name in model_name_list]
125
+ if revision_name_textbox not in name_list:
126
+ col = csv_data.shape[0]
127
+ else:
128
+ col = name_list.index(revision_name_textbox)
129
+ csv_data.loc[col] = new_data
130
+ csv_data = csv_data.to_csv(CSV_DIR, index=False)
131
  return 0
132
 
133
  def get_baseline_df():