Commit
•
c668bc2
1
Parent(s):
4b68679
fix: add token to env var
Browse files
src/distilabel_dataset_generator/sft.py
CHANGED
@@ -177,6 +177,7 @@ def _generate_dataset(
|
|
177 |
_dataset_name=None,
|
178 |
_token: OAuthToken = None,
|
179 |
):
|
|
|
180 |
gr.Info("Started pipeline execution.")
|
181 |
result_queue = multiprocessing.Queue()
|
182 |
p = multiprocessing.Process(
|
@@ -188,7 +189,6 @@ def _generate_dataset(
|
|
188 |
distiset = result_queue.get()
|
189 |
|
190 |
if _dataset_name is not None:
|
191 |
-
os.environ["HF_TOKEN"] = _token.token
|
192 |
gr.Info("Pushing dataset to Hugging Face Hub...")
|
193 |
distiset.push_to_hub(
|
194 |
repo_id=_dataset_name,
|
|
|
177 |
_dataset_name=None,
|
178 |
_token: OAuthToken = None,
|
179 |
):
|
180 |
+
os.environ["HF_TOKEN"] = _token.token
|
181 |
gr.Info("Started pipeline execution.")
|
182 |
result_queue = multiprocessing.Queue()
|
183 |
p = multiprocessing.Process(
|
|
|
189 |
distiset = result_queue.get()
|
190 |
|
191 |
if _dataset_name is not None:
|
|
|
192 |
gr.Info("Pushing dataset to Hugging Face Hub...")
|
193 |
distiset.push_to_hub(
|
194 |
repo_id=_dataset_name,
|