Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -13,7 +13,7 @@ import transformers # to load an LLM
|
|
13 |
|
14 |
# Constants
|
15 |
GREETING = (
|
16 |
-
"Howdy! I'm an AI agent that uses [retrieval-augmented generation](https://en.wikipedia.org/wiki/Retrieval-augmented_generation)"
|
17 |
"to answer questions about published at [ASME IDETC](https://asmedigitalcollection.asme.org/IDETC-CIE). "
|
18 |
"I always try to cite my sources, but sometimes things get a little weird. "
|
19 |
"What can I tell you about today?"
|
@@ -89,8 +89,8 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
89 |
+ title.title()
|
90 |
+ "]("
|
91 |
+ url
|
92 |
-
+ ")
|
93 |
-
+ text + "\n\n"
|
94 |
)
|
95 |
|
96 |
prompt = prompt.replace("{{ABSTRACTS_GO_HERE}}", research_abstracts)
|
|
|
13 |
|
14 |
# Constants
|
15 |
GREETING = (
|
16 |
+
"Howdy! I'm an AI agent that uses [retrieval-augmented generation](https://en.wikipedia.org/wiki/Retrieval-augmented_generation) "
|
17 |
"to answer questions about published at [ASME IDETC](https://asmedigitalcollection.asme.org/IDETC-CIE). "
|
18 |
"I always try to cite my sources, but sometimes things get a little weird. "
|
19 |
"What can I tell you about today?"
|
|
|
89 |
+ title.title()
|
90 |
+ "]("
|
91 |
+ url
|
92 |
+
+ ")\n"
|
93 |
+
# + text + "\n\n"
|
94 |
)
|
95 |
|
96 |
prompt = prompt.replace("{{ABSTRACTS_GO_HERE}}", research_abstracts)
|