Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -96,6 +96,8 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
96 |
prompt = prompt.replace("{{ABSTRACTS_GO_HERE}}", research_abstracts)
|
97 |
prompt = prompt.replace("{{QUERY_GOES_HERE}}", query)
|
98 |
|
|
|
|
|
99 |
return prompt, "\n\n### References\n\n"+"\n".join([str(i+1)+". " + ref + "\n\t- ".join(["", *[x.replace("\n", " ") for x in references[ref]]]) for i, ref in enumerate(references.keys())])
|
100 |
|
101 |
def postprocess(response: str, bypass_from_preprocessing: str) -> str:
|
|
|
96 |
prompt = prompt.replace("{{ABSTRACTS_GO_HERE}}", research_abstracts)
|
97 |
prompt = prompt.replace("{{QUERY_GOES_HERE}}", query)
|
98 |
|
99 |
+
print(references)
|
100 |
+
|
101 |
return prompt, "\n\n### References\n\n"+"\n".join([str(i+1)+". " + ref + "\n\t- ".join(["", *[x.replace("\n", " ") for x in references[ref]]]) for i, ref in enumerate(references.keys())])
|
102 |
|
103 |
def postprocess(response: str, bypass_from_preprocessing: str) -> str:
|