namelessai commited on
Commit
d011276
·
verified ·
1 Parent(s): 93e65c2

Update app.py

Browse files

Update DDGS dependency

Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from duckduckgo_search import DDGS
3
  import requests
4
  import os
5
  import zipfile
@@ -32,7 +32,7 @@ def scrape_and_zip_images(search_term, max_images=500):
32
  max_images = min(max_images, 500)
33
 
34
  results = ddgs.images(
35
- keywords=search_term,
36
  region="wt-wt",
37
  safesearch="moderate",
38
  max_results=max_images
@@ -156,6 +156,7 @@ with gr.Blocks(title="DuckDuckGo Image Scraper") as demo:
156
  - The actual number of images downloaded may be less than requested due to rate limits or availability
157
  - Images are temporarily stored during processing and deleted after zipping
158
  - Download may take some time depending on the number of images
 
159
  """)
160
 
161
  if __name__ == "__main__":
 
1
  import gradio as gr
2
+ from ddgs import DDGS
3
  import requests
4
  import os
5
  import zipfile
 
32
  max_images = min(max_images, 500)
33
 
34
  results = ddgs.images(
35
+ query=search_term,
36
  region="wt-wt",
37
  safesearch="moderate",
38
  max_results=max_images
 
156
  - The actual number of images downloaded may be less than requested due to rate limits or availability
157
  - Images are temporarily stored during processing and deleted after zipping
158
  - Download may take some time depending on the number of images
159
+ - Uses the updated `ddgs` package (formerly `duckduckgo_search`)
160
  """)
161
 
162
  if __name__ == "__main__":