Spaces:
Running
Running
prithivMLmods
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -93,18 +93,13 @@ def generate_zip_file(url):
|
|
93 |
return temp_zip_path
|
94 |
|
95 |
# Gradio Interface
|
96 |
-
with gr.Blocks() as demo:
|
97 |
gr.Markdown("## Webpage to ZIP Downloader")
|
98 |
gr.Markdown("Enter a URL to download the webpage and its assets as a ZIP file.")
|
99 |
|
100 |
url_input = gr.Textbox(label="Website URL", placeholder="Enter a URL (e.g., https://www.example.com)")
|
101 |
|
102 |
-
|
103 |
-
with gr.Accordion("Examples"):
|
104 |
-
gr.Markdown("### Example URLs:")
|
105 |
-
example1 = gr.Button("https://www.bmw.com/en/index.html")
|
106 |
-
example2 = gr.Button("https://www.ferrari.com/en-EN")
|
107 |
-
example3 = gr.Button("https://streamlit.io/")
|
108 |
|
109 |
download_button = gr.Button("Download as ZIP")
|
110 |
output_file = gr.File(label="Download")
|
@@ -112,10 +107,6 @@ with gr.Blocks() as demo:
|
|
112 |
def set_example_url(url):
|
113 |
url_input.value = url
|
114 |
|
115 |
-
example1.click(lambda: set_example_url("https://www.bmw.com/en/index.html"), [], url_input)
|
116 |
-
example2.click(lambda: set_example_url("https://www.ferrari.com/en-EN"), [], url_input)
|
117 |
-
example3.click(lambda: set_example_url("https://streamlit.io/"), [], url_input)
|
118 |
-
|
119 |
download_button.click(fn=generate_zip_file, inputs=url_input, outputs=output_file)
|
120 |
|
121 |
-
demo.launch(
|
|
|
93 |
return temp_zip_path
|
94 |
|
95 |
# Gradio Interface
|
96 |
+
with gr.Blocks(theme="bethecloud/storj_theme") as demo:
|
97 |
gr.Markdown("## Webpage to ZIP Downloader")
|
98 |
gr.Markdown("Enter a URL to download the webpage and its assets as a ZIP file.")
|
99 |
|
100 |
url_input = gr.Textbox(label="Website URL", placeholder="Enter a URL (e.g., https://www.example.com)")
|
101 |
|
102 |
+
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
download_button = gr.Button("Download as ZIP")
|
105 |
output_file = gr.File(label="Download")
|
|
|
107 |
def set_example_url(url):
|
108 |
url_input.value = url
|
109 |
|
|
|
|
|
|
|
|
|
110 |
download_button.click(fn=generate_zip_file, inputs=url_input, outputs=output_file)
|
111 |
|
112 |
+
demo.launch()
|