Spaces:
Runtime error
Runtime error
Upload: Multiple files to assets directory
Browse files
app.py
CHANGED
@@ -59,6 +59,11 @@ def setup_local_repo_for_push():
|
|
59 |
# Configurar user.name y user.email
|
60 |
git_set_identity("JulioContrerasH", "[email protected]")
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
# Por si se actualiz贸 el Space en remoto
|
63 |
try:
|
64 |
repo.git_pull()
|
|
|
59 |
# Configurar user.name y user.email
|
60 |
git_set_identity("JulioContrerasH", "[email protected]")
|
61 |
|
62 |
+
# Forzar la URL remota para que lleve el token
|
63 |
+
# user: "__token__" (literal) y password: <token>
|
64 |
+
new_url = f"https://__token__:{token}@huggingface.co/spaces/JulioContrerasH/my-challenge"
|
65 |
+
subprocess.run(["git", "remote", "set-url", "origin", new_url], cwd=".", check=True)
|
66 |
+
|
67 |
# Por si se actualiz贸 el Space en remoto
|
68 |
try:
|
69 |
repo.git_pull()
|