Spaces:
Runtime error
Runtime error
Commit
·
55f6c76
1
Parent(s):
187ec7b
Update push_to_hub function with HF_TOKEN
Browse files- load_base_model_data.py +4 -1
load_base_model_data.py
CHANGED
|
@@ -7,6 +7,9 @@ from huggingface_hub import list_models
|
|
| 7 |
from pydantic import BaseModel, field_validator
|
| 8 |
from toolz import groupby
|
| 9 |
from tqdm.auto import tqdm
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
@lru_cache()
|
|
@@ -84,6 +87,6 @@ def load_data():
|
|
| 84 |
HubModel.from_original(model.__dict__).model_dump() for model in base_models
|
| 85 |
]
|
| 86 |
ds = Dataset.from_list(parsed_models + parsed_base_models)
|
| 87 |
-
ds.push_to_hub("davanstrien/hub_models_with_base_model_info")
|
| 88 |
print("Pushed to hub")
|
| 89 |
return ds
|
|
|
|
| 7 |
from pydantic import BaseModel, field_validator
|
| 8 |
from toolz import groupby
|
| 9 |
from tqdm.auto import tqdm
|
| 10 |
+
import os
|
| 11 |
+
|
| 12 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 13 |
|
| 14 |
|
| 15 |
@lru_cache()
|
|
|
|
| 87 |
HubModel.from_original(model.__dict__).model_dump() for model in base_models
|
| 88 |
]
|
| 89 |
ds = Dataset.from_list(parsed_models + parsed_base_models)
|
| 90 |
+
ds.push_to_hub("davanstrien/hub_models_with_base_model_info", token=HF_TOKEN)
|
| 91 |
print("Pushed to hub")
|
| 92 |
return ds
|