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