Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ EMBEDDING_MODEL = os.environ.get("EMBEDDING_MODEL", "hkunlp/instructor-large")
|
|
31 |
EMBEDDING_LOADER = HuggingFaceInstructEmbeddings
|
32 |
|
33 |
# return top-k text chunks from vector store
|
34 |
-
TOP_K_DEFAULT =
|
35 |
TOP_K_MAX = 30
|
36 |
SCORE_DEFAULT = 0.3
|
37 |
|
@@ -122,15 +122,17 @@ Chat History:
|
|
122 |
Question:
|
123 |
{question}
|
124 |
|
|
|
|
|
|
|
|
|
125 |
Optinal:
|
126 |
-
Expand clause/figure name with corresponding metadata
|
127 |
|
128 |
Desired format:
|
129 |
Clause/figure name: <dot_separated_numbers>
|
130 |
-
|
131 |
-
|
132 |
-
Answer:"""
|
133 |
-
)
|
134 |
|
135 |
PROMPT_BASE = PromptTemplate(
|
136 |
input_variables=['question', "chat_history"],
|
|
|
31 |
EMBEDDING_LOADER = HuggingFaceInstructEmbeddings
|
32 |
|
33 |
# return top-k text chunks from vector store
|
34 |
+
TOP_K_DEFAULT = 10
|
35 |
TOP_K_MAX = 30
|
36 |
SCORE_DEFAULT = 0.3
|
37 |
|
|
|
122 |
Question:
|
123 |
{question}
|
124 |
|
125 |
+
Answer:"""
|
126 |
+
)
|
127 |
+
|
128 |
+
'''
|
129 |
Optinal:
|
130 |
+
Expand each clause/figure name in the answer with corresponding metadata file name.
|
131 |
|
132 |
Desired format:
|
133 |
Clause/figure name: <dot_separated_numbers>
|
134 |
+
File name: *.*
|
135 |
+
'''
|
|
|
|
|
136 |
|
137 |
PROMPT_BASE = PromptTemplate(
|
138 |
input_variables=['question', "chat_history"],
|