Spaces:
Sleeping
Sleeping
Mikeplockhart
commited on
Commit
•
f5fba4f
1
Parent(s):
4c886ca
Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,13 @@ def search_chroma(query:str):
|
|
55 |
)
|
56 |
#print(results[0])
|
57 |
#print(results[0].QueryResponse.metadata)
|
58 |
-
instructions = ['\n'.join(item.metadata['payload']['instructions']) for item in results]
|
59 |
-
text_only= [f"# Title:\n{item.metadata['payload']['title']}\n\n## Description:\n{item.metadata['payload']['doc']}\n\n ## Instructions:\n{instructions}" for item in results]
|
|
|
|
|
|
|
|
|
|
|
60 |
print(text_only)
|
61 |
return "".join(text_only)
|
62 |
|
|
|
55 |
)
|
56 |
#print(results[0])
|
57 |
#print(results[0].QueryResponse.metadata)
|
58 |
+
#instructions = ['\n'.join(item.metadata['payload']['instructions']) for item in results]
|
59 |
+
#text_only= [f"# Title:\n{item.metadata['payload']['title']}\n\n## Description:\n{item.metadata['payload']['doc']}\n\n ## Instructions:\n{instructions}" for item in results]
|
60 |
+
text_only = []
|
61 |
+
for item in results:
|
62 |
+
instructions = '\n'.join(item.metadata['payload']['instructions'])
|
63 |
+
markdown_text = f"# Title:\n{item.metadata['payload']['title']}\n\n## Description:\n{item.metadata['payload']['doc']}\n\n ## Instructions:\n{instructions}"
|
64 |
+
text_only.append(markdown_text)
|
65 |
print(text_only)
|
66 |
return "".join(text_only)
|
67 |
|