Update app.py
Browse files
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
|
| 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
|
| 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",
|