Tu Nombre commited on
Commit
8e92d08
·
1 Parent(s): d70b31f

fix: debug commit

Browse files
Files changed (1) hide show
  1. main.py +5 -2
main.py CHANGED
@@ -228,7 +228,7 @@ demo.launch()
228
 
229
  # Subir archivos via commit API
230
  import base64, json as _json
231
- def b64(s): return base64.b64encode(s.encode()).decode()
232
  commit_payload = {
233
  "commit_message": "TubeBot init",
234
  "summary": "TubeBot init",
@@ -242,7 +242,10 @@ demo.launch()
242
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
243
  content=_json.dumps(commit_payload).encode()
244
  )
245
- print(f"Commit: {r2.status_code} {r2.text[:100]}")
 
 
 
246
 
247
  # Agregar secretos al Space del cliente
248
  secretos = {
 
228
 
229
  # Subir archivos via commit API
230
  import base64, json as _json
231
+ def b64(s): return base64.b64encode(s.encode("utf-8")).decode("utf-8")
232
  commit_payload = {
233
  "commit_message": "TubeBot init",
234
  "summary": "TubeBot init",
 
242
  headers={"Authorization": f"Bearer {HF_TOKEN}", "Content-Type": "application/json"},
243
  content=_json.dumps(commit_payload).encode()
244
  )
245
+ print(f"Commit: {r2.status_code} {r2.text[:300]}")
246
+ if r2.status_code != 200:
247
+ print(f"Payload keys: {list(commit_payload.keys())}")
248
+ print(f"main_code len: {len(main_code)}")
249
 
250
  # Agregar secretos al Space del cliente
251
  secretos = {