Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -105,8 +105,7 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
105 |
|
106 |
list_of_references = "\n".join(
|
107 |
[
|
108 |
-
|
109 |
-
+ ". "
|
110 |
+ hyperlinked_title
|
111 |
+ "\n\n> ".join(
|
112 |
[
|
@@ -121,7 +120,7 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
121 |
]
|
122 |
)
|
123 |
|
124 |
-
return prompt, "
|
125 |
|
126 |
|
127 |
def postprocess(response: str, bypass_from_preprocessing: str) -> str:
|
|
|
105 |
|
106 |
list_of_references = "\n".join(
|
107 |
[
|
108 |
+
"#### "
|
|
|
109 |
+ hyperlinked_title
|
110 |
+ "\n\n> ".join(
|
111 |
[
|
|
|
120 |
]
|
121 |
)
|
122 |
|
123 |
+
return prompt, "<details><summary>\n\n### References\n\n</summary>\n\n" + list_of_references + "\n\n</summary>"
|
124 |
|
125 |
|
126 |
def postprocess(response: str, bypass_from_preprocessing: str) -> str:
|