Spaces:
Sleeping
Sleeping
Update sherlock2.py
Browse files- sherlock2.py +3 -1
sherlock2.py
CHANGED
|
@@ -294,6 +294,8 @@ def investigate():
|
|
| 294 |
search_options = st.multiselect("Search for additional clues:", ["Wikipedia", "Internet"], default=["Wikipedia"])
|
| 295 |
if st.button("Search"):
|
| 296 |
with st.spinner("Searching for clues..."):
|
|
|
|
|
|
|
| 297 |
if "Wikipedia" in search_options:
|
| 298 |
wikipedia_info = search_and_scrape_wikipedia(keywords)
|
| 299 |
st.subheader("Wikipedia Findings:")
|
|
@@ -318,7 +320,7 @@ def investigate():
|
|
| 318 |
including deductions, potential suspects, and conclusions.
|
| 319 |
"""
|
| 320 |
final_report = model.generate_content([sherlock_persona, sherlock_guidelines, report_prompt,
|
| 321 |
-
|
| 322 |
st.header("Case Report")
|
| 323 |
st.write(final_report.text)
|
| 324 |
|
|
|
|
| 294 |
search_options = st.multiselect("Search for additional clues:", ["Wikipedia", "Internet"], default=["Wikipedia"])
|
| 295 |
if st.button("Search"):
|
| 296 |
with st.spinner("Searching for clues..."):
|
| 297 |
+
wikipedia_info = [] # Initialize with an empty list
|
| 298 |
+
web_search_results = []
|
| 299 |
if "Wikipedia" in search_options:
|
| 300 |
wikipedia_info = search_and_scrape_wikipedia(keywords)
|
| 301 |
st.subheader("Wikipedia Findings:")
|
|
|
|
| 320 |
including deductions, potential suspects, and conclusions.
|
| 321 |
"""
|
| 322 |
final_report = model.generate_content([sherlock_persona, sherlock_guidelines, report_prompt,
|
| 323 |
+
case_embeddings_str, str(wikipedia_info), str(web_search_results)])
|
| 324 |
st.header("Case Report")
|
| 325 |
st.write(final_report.text)
|
| 326 |
|