jayash391 commited on
Commit
b4db657
·
verified ·
1 Parent(s): 67eb570

Update sherlock2.py

Browse files
Files changed (1) hide show
  1. sherlock2.py +2 -2
sherlock2.py CHANGED
@@ -87,9 +87,9 @@ def search_and_scrape_wikipedia(keywords, max_topics_per_query=3, mining_model='
87
  mining_model = genai.GenerativeModel(mining_model) # Initialize the generative model
88
 
89
  for query in keywords:
90
- search_terms = wikipedia.search(query) # Search Wikipedia using the keyword
91
 
92
- for search_term in search_terms[:max_topics_per_query]: # Explore top results
93
  if search_term in search_history:
94
  continue # Skip if the topic has already been explored
95
 
 
87
  mining_model = genai.GenerativeModel(mining_model) # Initialize the generative model
88
 
89
  for query in keywords:
90
+ search_terms = wikipedia.search(query, results=max_topics_per_query, suggestion=False) # Search Wikipedia using the keyword
91
 
92
+ for search_term in search_terms: # Explore top results
93
  if search_term in search_history:
94
  continue # Skip if the topic has already been explored
95