Spaces:
Running
Running
update
Browse files
app.py
CHANGED
|
@@ -12,14 +12,9 @@ from src.compute import compute_scores
|
|
| 12 |
|
| 13 |
global data_component, filter_component
|
| 14 |
|
| 15 |
-
from huggingface_hub import
|
| 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,13 +108,6 @@ def add_new_eval(
|
|
| 113 |
csv_data.to_csv(CSV_DIR, index=False)
|
| 114 |
|
| 115 |
# push newly added result
|
| 116 |
-
# print(repo.git_remote_url())
|
| 117 |
-
# print("git add...")
|
| 118 |
-
# repo.git_add(CSV_DIR)
|
| 119 |
-
# print("git commit...")
|
| 120 |
-
# repo.git_commit(f"add {model_name_textbox}")
|
| 121 |
-
# print("git push...")
|
| 122 |
-
# repo.push_to_hub()
|
| 123 |
api.upload_file(
|
| 124 |
path_or_fileobj=CSV_DIR,
|
| 125 |
path_in_repo=CSV_DIR,
|
|
@@ -281,7 +269,4 @@ with block:
|
|
| 281 |
|
| 282 |
# block.load(get_baseline_df, outputs=data_title)
|
| 283 |
|
| 284 |
-
os.system("git config --global user.email \"liuyuanxin@stu.pku.edu.cn\"")
|
| 285 |
-
os.system("git config --global user.name \"lyx97\"")
|
| 286 |
-
os.system("git config --list")
|
| 287 |
block.launch()
|
|
|
|
| 12 |
|
| 13 |
global data_component, filter_component
|
| 14 |
|
| 15 |
+
from huggingface_hub import HfApi
|
| 16 |
hf_token = os.getenv('HF_TOKEN')
|
| 17 |
api = HfApi(token=hf_token)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
def validate_model_size(s):
|
| 20 |
pattern = r'^\d+B$|^-$'
|
|
|
|
| 108 |
csv_data.to_csv(CSV_DIR, index=False)
|
| 109 |
|
| 110 |
# push newly added result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
api.upload_file(
|
| 112 |
path_or_fileobj=CSV_DIR,
|
| 113 |
path_in_repo=CSV_DIR,
|
|
|
|
| 269 |
|
| 270 |
# block.load(get_baseline_df, outputs=data_title)
|
| 271 |
|
|
|
|
|
|
|
|
|
|
| 272 |
block.launch()
|