Spaces:
Running
Running
Tu Nombre commited on
Commit ·
604324b
1
Parent(s): 44cd4a7
fix token cuenta correcta
Browse files
main.py
CHANGED
|
@@ -147,7 +147,7 @@ CMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"7860\"]""
|
|
| 147 |
}
|
| 148 |
r2 = await client.post(
|
| 149 |
f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/commit/main",
|
| 150 |
-
headers={"Authorization": f"Bearer {
|
| 151 |
content=_json.dumps(commit_payload).encode()
|
| 152 |
)
|
| 153 |
print(f"Commit: {r2.status_code} {r2.text[:200]}")
|
|
@@ -162,7 +162,7 @@ CMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"7860\"]""
|
|
| 162 |
for key, val in secretos.items():
|
| 163 |
await client.post(
|
| 164 |
f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/secrets",
|
| 165 |
-
headers={"Authorization": f"Bearer {
|
| 166 |
json={"key": key, "value": val}
|
| 167 |
)
|
| 168 |
|
|
|
|
| 147 |
}
|
| 148 |
r2 = await client.post(
|
| 149 |
f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/commit/main",
|
| 150 |
+
headers={"Authorization": f"Bearer {token_actual}", "Content-Type": "application/json"},
|
| 151 |
content=_json.dumps(commit_payload).encode()
|
| 152 |
)
|
| 153 |
print(f"Commit: {r2.status_code} {r2.text[:200]}")
|
|
|
|
| 162 |
for key, val in secretos.items():
|
| 163 |
await client.post(
|
| 164 |
f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/secrets",
|
| 165 |
+
headers={"Authorization": f"Bearer {token_actual}", "Content-Type": "application/json"},
|
| 166 |
json={"key": key, "value": val}
|
| 167 |
)
|
| 168 |
|