Spaces:
Runtime error
Runtime error
dev(hus): add write perimission token
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ from uuid import uuid4
|
|
15 |
|
16 |
import gradio as gr
|
17 |
|
18 |
-
|
19 |
###########
|
20 |
|
21 |
_QUESTION_SESSIONS = {}
|
@@ -133,10 +133,11 @@ def _get_api_key_cfgs(api_key):
|
|
133 |
if __name__ == '__main__':
|
134 |
|
135 |
###########################
|
|
|
136 |
JSON_DATASET_DIR = Path("json_dataset")
|
137 |
JSON_DATASET_DIR.mkdir(parents=True, exist_ok=True)
|
138 |
JSON_DATASET_PATH = JSON_DATASET_DIR / f"train-{uuid4()}.json"
|
139 |
-
scheduler = CommitScheduler(
|
140 |
repo_id="container",
|
141 |
repo_type="dataset",
|
142 |
folder_path=JSON_DATASET_DIR,
|
|
|
15 |
|
16 |
import gradio as gr
|
17 |
|
18 |
+
import huggingface_hub
|
19 |
###########
|
20 |
|
21 |
_QUESTION_SESSIONS = {}
|
|
|
133 |
if __name__ == '__main__':
|
134 |
|
135 |
###########################
|
136 |
+
huggingface_hub.login(token = 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, write_permission = Ture)
|
137 |
JSON_DATASET_DIR = Path("json_dataset")
|
138 |
JSON_DATASET_DIR.mkdir(parents=True, exist_ok=True)
|
139 |
JSON_DATASET_PATH = JSON_DATASET_DIR / f"train-{uuid4()}.json"
|
140 |
+
scheduler = huggingface_hub.CommitScheduler(
|
141 |
repo_id="container",
|
142 |
repo_type="dataset",
|
143 |
folder_path=JSON_DATASET_DIR,
|