dunlp commited on
Commit
92023a0
1 Parent(s): bbc169d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,7 +69,7 @@ def process_files(phase, objecten_file_data, templates_zip_file_data):
69
 
70
  # Finalize the output
71
  output_zip_buffer.seek(0)
72
- return (output_zip_buffer, "output.zip"), "" # Return file and an empty error log on success
73
 
74
  except Exception as e:
75
  # Capture the full traceback
@@ -86,7 +86,7 @@ interface = gr.Interface(
86
  gr.File(label="Upload Templates ZIP File", type='binary')
87
  ],
88
  outputs=[
89
- gr.File(label="Download ZIP File"), # This expects a tuple (file data, filename)
90
  gr.Textbox(label="Error Log") # Textbox to display the error log
91
  ],
92
  title="Template Folder Generator",
 
69
 
70
  # Finalize the output
71
  output_zip_buffer.seek(0)
72
+ return output_zip_buffer.getvalue(), "" # Return bytes and an empty error log on success
73
 
74
  except Exception as e:
75
  # Capture the full traceback
 
86
  gr.File(label="Upload Templates ZIP File", type='binary')
87
  ],
88
  outputs=[
89
+ gr.File(label="Download ZIP File"), # This now expects bytes or path
90
  gr.Textbox(label="Error Log") # Textbox to display the error log
91
  ],
92
  title="Template Folder Generator",