Spaces:
Sleeping
Sleeping
Update sherlock2.py
Browse files- 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
|
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
|