t29mato Claude Opus 4.6 commited on
Commit
ced277b
·
1 Parent(s): f000791

Change custom API path to /custom_api/ to avoid Gradio /api/ conflict

Browse files

Gradio intercepts all /api/* routes when mounted at /. Use
/custom_api/digitize_base64 instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. api_server.py +1 -1
api_server.py CHANGED
@@ -463,7 +463,7 @@ def create_fastapi_app():
463
  allow_headers=["*"],
464
  )
465
 
466
- @app.post("/api/digitize_base64")
467
  async def api_digitize_base64(request: Request):
468
  body = await request.json()
469
  data = body.get("data", [])
 
463
  allow_headers=["*"],
464
  )
465
 
466
+ @app.post("/custom_api/digitize_base64")
467
  async def api_digitize_base64(request: Request):
468
  body = await request.json()
469
  data = body.get("data", [])