Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -216,7 +216,7 @@ def start_training(
|
|
| 216 |
config["config"]["process"][0]["network"]["linear_alpha"] = int(rank)
|
| 217 |
config["config"]["process"][0]["datasets"][0]["folder_path"] = dataset_folder
|
| 218 |
config["config"]["process"][0]["save"]["push_to_hub"] = True
|
| 219 |
-
config["config"]["process"][0]["save"]["hf_repo_id"] = model_repo_id
|
| 220 |
try:
|
| 221 |
username = whoami()["name"] if not is_spaces else profile.username
|
| 222 |
except:
|
|
@@ -294,6 +294,7 @@ def start_training(
|
|
| 294 |
# Inject HF_TOKEN into the new space
|
| 295 |
api.add_space_secret(repo_id=new_space_id, key="HF_TOKEN", value=hf_token)
|
| 296 |
api.add_space_secret(repo_id=new_space_id, key="HF_DATASET", value=f"{profile.username}/autotrain-{slugged_lora_name}")
|
|
|
|
| 297 |
print(f"Added HF_TOKEN secret to {new_space_id}")
|
| 298 |
except Exception as e:
|
| 299 |
print(f"Failed to add HF_TOKEN secret to new space: {e}")
|
|
|
|
| 216 |
config["config"]["process"][0]["network"]["linear_alpha"] = int(rank)
|
| 217 |
config["config"]["process"][0]["datasets"][0]["folder_path"] = dataset_folder
|
| 218 |
config["config"]["process"][0]["save"]["push_to_hub"] = True
|
| 219 |
+
#config["config"]["process"][0]["save"]["hf_repo_id"] = model_repo_id
|
| 220 |
try:
|
| 221 |
username = whoami()["name"] if not is_spaces else profile.username
|
| 222 |
except:
|
|
|
|
| 294 |
# Inject HF_TOKEN into the new space
|
| 295 |
api.add_space_secret(repo_id=new_space_id, key="HF_TOKEN", value=hf_token)
|
| 296 |
api.add_space_secret(repo_id=new_space_id, key="HF_DATASET", value=f"{profile.username}/autotrain-{slugged_lora_name}")
|
| 297 |
+
api.add_space_secret(repo_id=new_space_id, key="MODEL_REPO_ID", value=model_repo_id)
|
| 298 |
print(f"Added HF_TOKEN secret to {new_space_id}")
|
| 299 |
except Exception as e:
|
| 300 |
print(f"Failed to add HF_TOKEN secret to new space: {e}")
|