jayash391 commited on
Commit
b5fa189
1 Parent(s): 46bde93

Update sherlock2.py

Browse files
Files changed (1) hide show
  1. sherlock2.py +4 -4
sherlock2.py CHANGED
@@ -111,14 +111,14 @@ def process_images(uploaded_images):
111
  return image_insights
112
 
113
  def search_internet(case_text):
114
- """Generates search queries using Gemini 1.5 Pro and performs internet searches for case-related information."""
115
  prompt = """
116
- You are an expert detective assistant. Analyze the following case information and generate a list of search queries
117
- to find relevant information on the internet:
118
  """ + str(case_text)
119
 
120
  response = model.generate_content([prompt])
121
- search_queries = response.text.strip().split("\n")
122
 
123
  # Set up Google Custom Search API client
124
  load_dotenv() # Make sure this is called before accessing environment variables
 
111
  return image_insights
112
 
113
  def search_internet(case_text):
114
+ """Generates search queries using Gemini 1.5 Pro and performs internet searches for case-related information, limited to 10 searches."""
115
  prompt = """
116
+ You are an expert detective assistant. Analyze the following case information and generate a list of
117
+ the 10 most important search queries to find relevant information on the internet make sure that the queries you generates show results on the internet and are human like queirs generated:
118
  """ + str(case_text)
119
 
120
  response = model.generate_content([prompt])
121
+ search_queries = response.text.strip().split("\n")[:10]
122
 
123
  # Set up Google Custom Search API client
124
  load_dotenv() # Make sure this is called before accessing environment variables