register /map route before gradio mount (route order fix)
Browse files- _space/app.py +2 -2
_space/app.py
CHANGED
|
@@ -305,11 +305,11 @@ with ui.Blocks(title='Maastricht Kadaster Garden Finder') as demo:
|
|
| 305 |
btn.click(fn=apply_filters, inputs=inputs, outputs=[status, table, download])
|
| 306 |
demo.load(fn=apply_filters, inputs=inputs, outputs=[status, table, download])
|
| 307 |
|
| 308 |
-
fast_app = ui.mount_gradio_app(fast_app, demo, path='/')
|
| 309 |
-
|
| 310 |
@fast_app.get('/map/{pid}')
|
| 311 |
def map_page(pid: str):
|
| 312 |
return HTMLResponse(build_map_page(pid))
|
| 313 |
|
|
|
|
|
|
|
| 314 |
if __name__ == '__main__':
|
| 315 |
uvicorn.run(fast_app, host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
|
|
|
|
| 305 |
btn.click(fn=apply_filters, inputs=inputs, outputs=[status, table, download])
|
| 306 |
demo.load(fn=apply_filters, inputs=inputs, outputs=[status, table, download])
|
| 307 |
|
|
|
|
|
|
|
| 308 |
@fast_app.get('/map/{pid}')
|
| 309 |
def map_page(pid: str):
|
| 310 |
return HTMLResponse(build_map_page(pid))
|
| 311 |
|
| 312 |
+
fast_app = ui.mount_gradio_app(fast_app, demo, path='/')
|
| 313 |
+
|
| 314 |
if __name__ == '__main__':
|
| 315 |
uvicorn.run(fast_app, host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
|