lyx97 commited on
Commit
9af5e66
·
1 Parent(s): 54648b7
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -5,13 +5,13 @@ import pandas as pd
5
  import re
6
  import pdb
7
  import tempfile
 
8
 
9
  from constants import *
10
  from src.compute import compute_scores
11
 
12
  global data_component, filter_component
13
 
14
-
15
  def validate_model_size(s):
16
  pattern = r'^\d+B$|^-$'
17
  if re.match(pattern, s):
@@ -48,8 +48,6 @@ def add_new_eval(
48
  col = csv_data.shape[0]
49
  model_name = model_name_textbox
50
  name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in csv_data['Model']]
51
- print(name_list)
52
- print(model_name)
53
  assert model_name not in name_list
54
  else:
55
  model_name = revision_name_textbox
@@ -104,6 +102,16 @@ def add_new_eval(
104
  # with open(f'./file/{model_name}.json','w' ,encoding='utf-8') as f:
105
  # json.dump(new_data, f)
106
  csv_data.to_csv(CSV_DIR, index=False)
 
 
 
 
 
 
 
 
 
 
107
  return 0
108
 
109
  def get_baseline_df():
 
5
  import re
6
  import pdb
7
  import tempfile
8
+ import os
9
 
10
  from constants import *
11
  from src.compute import compute_scores
12
 
13
  global data_component, filter_component
14
 
 
15
  def validate_model_size(s):
16
  pattern = r'^\d+B$|^-$'
17
  if re.match(pattern, s):
 
48
  col = csv_data.shape[0]
49
  model_name = model_name_textbox
50
  name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in csv_data['Model']]
 
 
51
  assert model_name not in name_list
52
  else:
53
  model_name = revision_name_textbox
 
102
  # with open(f'./file/{model_name}.json','w' ,encoding='utf-8') as f:
103
  # json.dump(new_data, f)
104
  csv_data.to_csv(CSV_DIR, index=False)
105
+
106
+ # push newly added result
107
+ # add_command = f"git add {CSV_DIR}"
108
+ # commit_command = f"git commit -m \"add {model_name_textbox}\""
109
+ # push_command = "git push origin main"
110
+ # os.system(add_command)
111
+ # os.system(commit_command)
112
+ # os.system(push_command)
113
+ os.system('git status')
114
+ os.system('git remote -v')
115
  return 0
116
 
117
  def get_baseline_df():