luciagomez commited on
Commit
46bfd69
·
verified ·
1 Parent(s): 1019e6a

gradio fix

Browse files
Files changed (1) hide show
  1. app.py +20 -19
app.py CHANGED
@@ -157,44 +157,41 @@ You can now download the ZIP file below.
157
 
158
 
159
  # ===========================================================
160
- # 🎨 BEAUTIFUL GRADIO WEB APP
161
  # ===========================================================
162
 
163
  def run_extraction(url, max_links, depth):
164
  return extract_all_content_as_zip(url, int(max_links), int(depth))
165
 
166
 
167
- with gr.Blocks(theme=gr.themes.Soft(), title="Website Content Extractor") as app:
168
 
169
  gr.Markdown("""
170
  # 🌍 Website Content & PDF Extractor
171
 
172
- This tool downloads the **text and PDFs from a website** and packages everything into a ZIP file.
173
-
174
- Perfect for:
175
- • Research
176
- • Archiving documentation
177
- • Creating AI knowledge bases
178
- • Offline reading
179
  """)
180
 
 
 
181
  with gr.Box():
182
  gr.Markdown("## 🧭 How to use")
183
 
184
  gr.Markdown("""
185
- 1️⃣ Enter the homepage of a website
186
- 2️⃣ Choose how deep the crawler should explore
187
  3️⃣ Click **Start Extraction**
188
  4️⃣ Download your ZIP file
189
 
190
- ⚠️ Large websites may take several minutes.
191
  """)
192
 
193
- with gr.Row():
194
- url_input = gr.Textbox(
195
- label="Website URL",
196
- placeholder="https://example.com"
197
- )
 
198
 
199
  with gr.Row():
200
  max_links_input = gr.Slider(
@@ -222,8 +219,12 @@ Perfect for:
222
 
223
 
224
  # ===========================================================
225
- # 🚀 ENTRY POINT WEB APP ONLY
226
  # ===========================================================
227
 
228
  if __name__ == "__main__":
229
- app.launch(server_name="0.0.0.0", server_port=7860)
 
 
 
 
 
157
 
158
 
159
  # ===========================================================
160
+ # 🎨 GRADIO WEB APP (Gradio 6 FIXED)
161
  # ===========================================================
162
 
163
  def run_extraction(url, max_links, depth):
164
  return extract_all_content_as_zip(url, int(max_links), int(depth))
165
 
166
 
167
+ with gr.Blocks(title="Website Content Extractor") as app:
168
 
169
  gr.Markdown("""
170
  # 🌍 Website Content & PDF Extractor
171
 
172
+ Download the **text and PDFs from a website** and package everything into a ZIP file.
 
 
 
 
 
 
173
  """)
174
 
175
+ gr.Markdown("---")
176
+
177
  with gr.Box():
178
  gr.Markdown("## 🧭 How to use")
179
 
180
  gr.Markdown("""
181
+ 1️⃣ Enter a website homepage
182
+ 2️⃣ Choose how deep to crawl
183
  3️⃣ Click **Start Extraction**
184
  4️⃣ Download your ZIP file
185
 
186
+ ⚠️ Large sites may take several minutes.
187
  """)
188
 
189
+ gr.Markdown("---")
190
+
191
+ url_input = gr.Textbox(
192
+ label="Website URL",
193
+ placeholder="https://example.com"
194
+ )
195
 
196
  with gr.Row():
197
  max_links_input = gr.Slider(
 
219
 
220
 
221
  # ===========================================================
222
+ # 🚀 ENTRY POINT (GRADIO 6 FIX)
223
  # ===========================================================
224
 
225
  if __name__ == "__main__":
226
+ app.launch(
227
+ server_name="0.0.0.0",
228
+ server_port=7860,
229
+ theme=gr.themes.Soft()
230
+ )