Tu Nombre commited on
Commit
4cc4be0
·
1 Parent(s): 342cf59

fix repo_id

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -145,7 +145,7 @@ CMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"7860\"]""
145
  ]
146
  }
147
  r2 = await client.post(
148
- f"https://huggingface.co/api/spaces/{repo_id}/commit/main",
149
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
150
  content=_json.dumps(commit_payload).encode()
151
  )
@@ -160,12 +160,12 @@ CMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"7860\"]""
160
  }
161
  for key, val in secretos.items():
162
  await client.post(
163
- f"https://huggingface.co/api/spaces/{repo_id}/secrets",
164
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
165
  json={"key": key, "value": val}
166
  )
167
 
168
- hf_user_space = repo_id.replace("/", "-").lower()
169
  url = f"https://{hf_user_space}.hf.space"
170
  CLIENTES[email] = {"nicho": nicho, "url": url}
171
  guardar_clientes()
 
145
  ]
146
  }
147
  r2 = await client.post(
148
+ f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/commit/main",
149
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
150
  content=_json.dumps(commit_payload).encode()
151
  )
 
160
  }
161
  for key, val in secretos.items():
162
  await client.post(
163
+ f"https://huggingface.co/api/spaces/{hf_user_actual}/{space_id}/secrets",
164
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
165
  json={"key": key, "value": val}
166
  )
167
 
168
+ hf_user_space = f"{hf_user_actual}/{space_id}".replace("/", "-").lower()
169
  url = f"https://{hf_user_space}.hf.space"
170
  CLIENTES[email] = {"nicho": nicho, "url": url}
171
  guardar_clientes()