Spaces:
Runtime error
Runtime error
Nina
commited on
Commit
•
5cba42a
1
Parent(s):
adfbbbe
adding sources as secret manager
Browse files
app.py
CHANGED
@@ -46,9 +46,7 @@ def gen_conv(query: str, history=[system_template], ipcc=True):
|
|
46 |
if retrieve:
|
47 |
docs = dense.retrieve(query=query, top_k=5)
|
48 |
sources = "\n\n".join(
|
49 |
-
[
|
50 |
-
"If relevant, use those extracts in your answer and give the reference of the information you used."
|
51 |
-
]
|
52 |
+ [
|
53 |
f"{d.meta['file_name']} Page {d.meta['page_number']}\n{d.content}"
|
54 |
for d in docs
|
|
|
46 |
if retrieve:
|
47 |
docs = dense.retrieve(query=query, top_k=5)
|
48 |
sources = "\n\n".join(
|
49 |
+
[os.environ["sources"]]
|
|
|
|
|
50 |
+ [
|
51 |
f"{d.meta['file_name']} Page {d.meta['page_number']}\n{d.content}"
|
52 |
for d in docs
|