AndrewRqy commited on
Commit ·
2acec29
1
Parent(s): a1634cb
Try /file= route for sprite URLs instead of /gradio_api/file=
Browse files351 unmodified lines352353354355356357358351 unmodified linesif not path.exists():cache[name] = ""return ""uri = f"/gradio_api/file={path.as_posix()}"cache[name] = urireturn uri351 unmodified lines352353354355356357358359360361351 unmodified linesif not path.exists():cache[name] = ""return ""# Use the legacy /file= route — works in both Gradio 4.x and 5.x and# avoids the /gradio_api/file= pattern which is only recognized by# newer Gradio routing.uri = f"/file={path.as_posix()}"cache[name] = urireturn uri
app.py+4-1