Skip to content
Snippets Groups Projects

Added event trigger for removing output file in working directory

Merged s184058 requested to merge gradio_fix_unused_file_issue into main
3 files
+ 15
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 3
1
@@ -170,7 +170,9 @@ class Interface:
fn=operations.save_mask,
inputs=output_masks,
outputs=[save_output, save_output],
)
).success(
fn=lambda: os.remove('mask.tif')
) # Remove mask file from working directory immediately after sending it to /tmp/gradio
# Update 'Add mask' button interactivit according to the current count
counts.change(
Loading