bep40 commited on
Commit
adaa6f0
·
verified ·
1 Parent(s): 6a3b5da

restore clean backend (remove temp probe)

Browse files
Files changed (1) hide show
  1. backend.py +0 -25
backend.py CHANGED
@@ -1363,31 +1363,6 @@ async def _startup():
1363
  # ============ Static ============
1364
  app.mount("/static", StaticFiles(directory="frontend"), name="static")
1365
 
1366
-
1367
- @app.get("/_t")
1368
- def _t():
1369
- out = {}
1370
- try:
1371
- from huggingface_hub import HfApi
1372
- tok = os.environ.get("HF_TOKEN")
1373
- out["has_token"] = bool(tok)
1374
- api = HfApi(token=tok)
1375
- p = api.hf_hub_download("bep40/hangmu-att-private-test", "attendance.json",
1376
- repo_type="dataset", token=tok)
1377
- out["private_read"] = open(p).read()
1378
- except Exception as e:
1379
- out["error"] = type(e).__name__ + ": " + str(e)[:150]
1380
- try:
1381
- from huggingface_hub import HfApi
1382
- api = HfApi(token=os.environ.get("HF_TOKEN"))
1383
- api.upload_file(path_or_fileobj=b'{"w":1}', path_in_repo="_probe.json",
1384
- repo_id="bep40/hangmu-att-private-test", repo_type="dataset",
1385
- token=os.environ.get("HF_TOKEN"))
1386
- out["private_write"] = "OK"
1387
- except Exception as e:
1388
- out["write_error"] = type(e).__name__ + ": " + str(e)[:150]
1389
- return out
1390
-
1391
  @app.get("/")
1392
  async def serve_index():
1393
  # V38: no-store — cấm trình duyệt cache index.html (trước đây heuristic
 
1363
  # ============ Static ============
1364
  app.mount("/static", StaticFiles(directory="frontend"), name="static")
1365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1366
  @app.get("/")
1367
  async def serve_index():
1368
  # V38: no-store — cấm trình duyệt cache index.html (trước đây heuristic