Spaces:
Sleeping
Sleeping
Update sherlock2.py
Browse files- sherlock2.py +6 -3
sherlock2.py
CHANGED
|
@@ -273,15 +273,18 @@ def investigate():
|
|
| 273 |
# Combine information and analyze
|
| 274 |
combined_information = {
|
| 275 |
"case_text": case_text,
|
| 276 |
-
"case_embeddings": case_embeddings,
|
| 277 |
"image_insights": image_insights,
|
| 278 |
"keywords": keywords
|
| 279 |
}
|
|
|
|
|
|
|
|
|
|
| 280 |
prompt = """
|
| 281 |
You are Sherlock Holmes, the renowned detective. Analyze the following case information and provide insights or
|
| 282 |
suggestions for further investigation:
|
| 283 |
-
""" + str(combined_information)
|
| 284 |
-
|
|
|
|
| 285 |
|
| 286 |
# Display results in an expandable section
|
| 287 |
with st.expander("Sherlock's Analysis and Suggestions:"):
|
|
|
|
| 273 |
# Combine information and analyze
|
| 274 |
combined_information = {
|
| 275 |
"case_text": case_text,
|
|
|
|
| 276 |
"image_insights": image_insights,
|
| 277 |
"keywords": keywords
|
| 278 |
}
|
| 279 |
+
# Convert case_embeddings to a string
|
| 280 |
+
case_embeddings_str = " ".join(str(embedding) for embedding in case_embeddings)
|
| 281 |
+
|
| 282 |
prompt = """
|
| 283 |
You are Sherlock Holmes, the renowned detective. Analyze the following case information and provide insights or
|
| 284 |
suggestions for further investigation:
|
| 285 |
+
""" + str(combined_information) + "\nCase Embeddings: " + case_embeddings_str
|
| 286 |
+
|
| 287 |
+
response = model.generate_content([sherlock_persona, sherlock_guidelines, prompt])
|
| 288 |
|
| 289 |
# Display results in an expandable section
|
| 290 |
with st.expander("Sherlock's Analysis and Suggestions:"):
|