Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -63,8 +63,8 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
63 |
top_five = data.loc[I[0]]
|
64 |
|
65 |
prompt = (
|
66 |
-
"You are an AI assistant who delights in helping people learn about research from the IDETC Conference. Your main task is to provide an ANSWER to the USER_QUERY based on the
|
67 |
-
"
|
68 |
"USER_GUERY:\n{{QUERY_GOES_HERE}}\n\n"
|
69 |
"ANSWER:\n"
|
70 |
)
|
@@ -79,7 +79,7 @@ def preprocess(query: str, k: int) -> tuple[str, str]:
|
|
79 |
path = top_five["path"].values[i]
|
80 |
text = top_five["text"].values[i]
|
81 |
|
82 |
-
research_abstracts += str(i + i) + ". This excerpt
|
83 |
references += (
|
84 |
str(i + 1)
|
85 |
+ ". ["
|
|
|
63 |
top_five = data.loc[I[0]]
|
64 |
|
65 |
prompt = (
|
66 |
+
"You are an AI assistant who delights in helping people learn about research from the IDETC Conference. Your main task is to provide an ANSWER to the USER_QUERY based on the RESEARCH_EXCERPTS.\n\n"
|
67 |
+
"RESEARCH_EXCERPTS:\n{{ABSTRACTS_GO_HERE}}\n\n"
|
68 |
"USER_GUERY:\n{{QUERY_GOES_HERE}}\n\n"
|
69 |
"ANSWER:\n"
|
70 |
)
|
|
|
79 |
path = top_five["path"].values[i]
|
80 |
text = top_five["text"].values[i]
|
81 |
|
82 |
+
research_abstracts += str(i + i) + ". This excerpt is from: '" + title + "':\n" + text + "\n"
|
83 |
references += (
|
84 |
str(i + 1)
|
85 |
+ ". ["
|