Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -133,6 +133,8 @@ def _get_api_key_cfgs(api_key):
|
|
133 |
if __name__ == '__main__':
|
134 |
|
135 |
###########################
|
|
|
|
|
136 |
write_token = os.environ.get('token')
|
137 |
huggingface_hub.login(token = write_token, write_permission = True)
|
138 |
JSON_DATASET_DIR = Path("json_dataset")
|
@@ -142,7 +144,7 @@ if __name__ == '__main__':
|
|
142 |
repo_id="container",
|
143 |
repo_type="dataset",
|
144 |
folder_path=JSON_DATASET_DIR,
|
145 |
-
path_in_repo="log",
|
146 |
)
|
147 |
with scheduler.lock:
|
148 |
with JSON_DATASET_PATH.open("a") as f:
|
|
|
133 |
if __name__ == '__main__':
|
134 |
|
135 |
###########################
|
136 |
+
if not os.path.exists(folder_path):
|
137 |
+
os.makedirs(folder_path)
|
138 |
write_token = os.environ.get('token')
|
139 |
huggingface_hub.login(token = write_token, write_permission = True)
|
140 |
JSON_DATASET_DIR = Path("json_dataset")
|
|
|
144 |
repo_id="container",
|
145 |
repo_type="dataset",
|
146 |
folder_path=JSON_DATASET_DIR,
|
147 |
+
path_in_repo="container.log",
|
148 |
)
|
149 |
with scheduler.lock:
|
150 |
with JSON_DATASET_PATH.open("a") as f:
|