lyx97 commited on
Commit
0c6392d
·
1 Parent(s): 6722a61
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -14,12 +14,13 @@ global data_component, filter_component
14
 
15
  from huggingface_hub import Repository, HfApi
16
  hf_token = os.getenv('HF_TOKEN')
17
- api = HfApi(token=hf_token)
18
- repo = Repository(
19
- local_dir=".",
20
- clone_from="https://huggingface.co/spaces/lyx97/TempCompass",
21
- use_auth_token=hf_token,
22
- )
 
23
 
24
  def validate_model_size(s):
25
  pattern = r'^\d+B$|^-$'
@@ -113,15 +114,9 @@ def add_new_eval(
113
  csv_data.to_csv(CSV_DIR, index=False)
114
 
115
  # push newly added result
116
- # add_command = f"git add {CSV_DIR}"
117
- # commit_command = f"git commit -m \"add {model_name_textbox}\""
118
- # push_command = "git push origin main"
119
- # os.system(add_command)
120
- # os.system(commit_command)
121
- # os.system(push_command)
122
- repo.git_add(CSV_DIR)
123
- repo.git_commit(f"add {model_name_textbox}")
124
- repo.push_to_hub()
125
  return 0
126
 
127
  def get_baseline_df():
 
14
 
15
  from huggingface_hub import Repository, HfApi
16
  hf_token = os.getenv('HF_TOKEN')
17
+ print(hf_token)
18
+ # api = HfApi(token=hf_token)
19
+ # repo = Repository(
20
+ # local_dir=".",
21
+ # clone_from="https://huggingface.co/spaces/lyx97/TempCompass",
22
+ # use_auth_token=hf_token,
23
+ # )
24
 
25
  def validate_model_size(s):
26
  pattern = r'^\d+B$|^-$'
 
114
  csv_data.to_csv(CSV_DIR, index=False)
115
 
116
  # push newly added result
117
+ # repo.git_add(CSV_DIR)
118
+ # repo.git_commit(f"add {model_name_textbox}")
119
+ # repo.push_to_hub()
 
 
 
 
 
 
120
  return 0
121
 
122
  def get_baseline_df():