Spaces:
Build error
Build error
update
Browse files
app.py
CHANGED
|
@@ -14,13 +14,12 @@ global data_component, filter_component
|
|
| 14 |
|
| 15 |
from huggingface_hub import Repository, HfApi
|
| 16 |
hf_token = os.getenv('HF_TOKEN')
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
# )
|
| 24 |
|
| 25 |
def validate_model_size(s):
|
| 26 |
pattern = r'^\d+B$|^-$'
|
|
@@ -114,9 +113,10 @@ def add_new_eval(
|
|
| 114 |
csv_data.to_csv(CSV_DIR, index=False)
|
| 115 |
|
| 116 |
# push newly added result
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
| 120 |
return 0
|
| 121 |
|
| 122 |
def get_baseline_df():
|
|
|
|
| 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 |
csv_data.to_csv(CSV_DIR, index=False)
|
| 114 |
|
| 115 |
# push newly added result
|
| 116 |
+
print(repo.git_remote_url())
|
| 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():
|