Spaces:
Sleeping
Sleeping
Update sherlock2.py
Browse files- sherlock2.py +2 -2
sherlock2.py
CHANGED
|
@@ -59,7 +59,7 @@ def generate_embeddings_from_documents(extracted_text):
|
|
| 59 |
# Determine the appropriate task type (e.g., "RETRIEVAL_DOCUMENT" for search/similarity)
|
| 60 |
task_type = "RETRIEVAL_DOCUMENT"
|
| 61 |
response = genai.embed_content(model=embed_model, content=text, task_type=task_type)
|
| 62 |
-
embeddings.append(response["embedding"])
|
| 63 |
except Exception as e:
|
| 64 |
st.error(f"Error generating embeddings: {e}")
|
| 65 |
return embeddings
|
|
@@ -315,7 +315,7 @@ def investigate():
|
|
| 315 |
including deductions, potential suspects, and conclusions.
|
| 316 |
"""
|
| 317 |
final_report = model.generate_content([sherlock_persona, sherlock_guidelines, report_prompt,
|
| 318 |
-
|
| 319 |
st.header("Case Report")
|
| 320 |
st.write(final_report.text)
|
| 321 |
|
|
|
|
| 59 |
# Determine the appropriate task type (e.g., "RETRIEVAL_DOCUMENT" for search/similarity)
|
| 60 |
task_type = "RETRIEVAL_DOCUMENT"
|
| 61 |
response = genai.embed_content(model=embed_model, content=text, task_type=task_type)
|
| 62 |
+
embeddings.append({"embedding": response["embedding"]})
|
| 63 |
except Exception as e:
|
| 64 |
st.error(f"Error generating embeddings: {e}")
|
| 65 |
return embeddings
|
|
|
|
| 315 |
including deductions, potential suspects, and conclusions.
|
| 316 |
"""
|
| 317 |
final_report = model.generate_content([sherlock_persona, sherlock_guidelines, report_prompt,
|
| 318 |
+
case_embeddings, str(wikipedia_info), str(web_search_results)])
|
| 319 |
st.header("Case Report")
|
| 320 |
st.write(final_report.text)
|
| 321 |
|