Spaces:
Sleeping
Sleeping
Commit ·
0359819
1
Parent(s): 054c9d4
Fix G-Code upload spinner by keeping file widget always mounted
Browse files329 unmodified lines330331332333334335336329 unmodified lines6666676686696706716723 unmodified lines676677678679680681329 unmodified linesdef toggle_gcode_source(source: str) -> dict[str, Any]:return gr.update(visible=(source == GCODE_SOURCE_UPLOAD))def render_toolpath(329 unmodified linesgcode_upload = gr.File(label="Upload G-Code",file_types=[".txt", ".gcode", ".nc"],visible=False,)render_button = gr.Button("Render Tool Path", variant="primary")toolpath_plot = gr.Plot(label="Tool Path")3 unmodified linesfn=toggle_gcode_source,inputs=[gcode_source],outputs=[gcode_upload],)render_button.click(fn=render_toolpath,329 unmodified lines330331332333334335336329 unmodified lines6666676686696706716723 unmodified lines676677678679680681682329 unmodified linesdef toggle_gcode_source(source: str) -> dict[str, Any]:return gr.update(interactive=(source == GCODE_SOURCE_UPLOAD))def render_toolpath(329 unmodified linesgcode_upload = gr.File(label="Upload G-Code",file_types=[".txt", ".gcode", ".nc"],interactive=False,)render_button = gr.Button("Render Tool Path", variant="primary")toolpath_plot = gr.Plot(label="Tool Path")3 unmodified linesfn=toggle_gcode_source,inputs=[gcode_source],outputs=[gcode_upload],queue=False,)render_button.click(fn=render_toolpath,
app.py+3-2