Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -143,7 +143,7 @@ def process_urls(url_input, bulk_toggle, action_radio, max_urls, crawl_depth, pr
|
|
143 |
# Validate all URLs
|
144 |
invalid_urls = [url for url in urls if not validate_url(url)]
|
145 |
if invalid_urls:
|
146 |
-
return None, f"Invalid URLs detected: {', '.join(invalid_urls)}"
|
147 |
|
148 |
scraped_data = []
|
149 |
screenshots = []
|
@@ -235,7 +235,8 @@ def process_urls(url_input, bulk_toggle, action_radio, max_urls, crawl_depth, pr
|
|
235 |
'changes_detected': changes_log
|
236 |
}
|
237 |
|
238 |
-
|
|
|
239 |
|
240 |
def create_interface():
|
241 |
"""Create the Gradio interface."""
|
|
|
143 |
# Validate all URLs
|
144 |
invalid_urls = [url for url in urls if not validate_url(url)]
|
145 |
if invalid_urls:
|
146 |
+
return gr.FileData(None, "error.zip"), f"Invalid URLs detected: {', '.join(invalid_urls)}"
|
147 |
|
148 |
scraped_data = []
|
149 |
screenshots = []
|
|
|
235 |
'changes_detected': changes_log
|
236 |
}
|
237 |
|
238 |
+
# Return ZIP file data and display data
|
239 |
+
return gr.FileData(zip_bytes, "results.zip"), json.dumps(display_data, indent=2)
|
240 |
|
241 |
def create_interface():
|
242 |
"""Create the Gradio interface."""
|