Spaces:
Runtime error
Runtime error
Fix example button: run prediction directly instead of populating inputs
Browse files248 unmodified lines249250251252253254255256257258259260261262263264248 unmodified lines# Example sectionif os.path.exists(EXAMPLE_FILE):gr.Markdown("---\n**No GeoTIFF handy?** Click below to try an example tile from Danum Valley, Borneo.")example_btn = gr.Button("Load example tile", variant="secondary")def load_example():return EXAMPLE_FILE, "Flexible", 0.3example_btn.click(load_example,inputs=[],outputs=[inp_file, env_dd, conf],)# Manage Weights tab (hidden unless admin env var is set)248 unmodified lines249250251252253254255256257258259260261262263264265248 unmodified lines# Example sectionif os.path.exists(EXAMPLE_FILE):gr.Markdown("---\n**No GeoTIFF handy?** Click below to run detectree2 on an example tile from Danum Valley, Borneo.")example_btn = gr.Button("▶ Run example", variant="secondary")def run_example():return run_detectree2(EXAMPLE_FILE, "Flexible", 0.3)example_btn.click(run_example,inputs=[],outputs=[out_img, out_gpkg, out_stats, out_err],concurrency_limit=1,)# Manage Weights tab (hidden unless admin env var is set)
app.py+7-6