Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def bot(
|
|
55 |
top_p,
|
56 |
top_k,
|
57 |
temp
|
58 |
-
)
|
59 |
tokens = get_system_tokens(model)[:]
|
60 |
tokens.append(LINEBREAK_TOKEN)
|
61 |
|
@@ -155,21 +155,14 @@ with gr.Blocks(
|
|
155 |
# Pressing Enter
|
156 |
submit_event = msg.submit(
|
157 |
fn=user,
|
158 |
-
inputs=[msg, chatbot
|
159 |
outputs=[msg, chatbot],
|
160 |
queue=False,
|
161 |
-
).success(
|
162 |
-
fn=retrieve,
|
163 |
-
inputs=[chatbot, db, retrieved_docs, k_documents],
|
164 |
-
outputs=[retrieved_docs],
|
165 |
-
queue=True,
|
166 |
).success(
|
167 |
fn=bot,
|
168 |
inputs=[
|
169 |
chatbot,
|
170 |
system_prompt,
|
171 |
-
conversation_id,
|
172 |
-
retrieved_docs,
|
173 |
top_p,
|
174 |
top_k,
|
175 |
temp
|
@@ -184,18 +177,11 @@ with gr.Blocks(
|
|
184 |
inputs=[msg, chatbot, system_prompt],
|
185 |
outputs=[msg, chatbot],
|
186 |
queue=False,
|
187 |
-
).success(
|
188 |
-
fn=retrieve,
|
189 |
-
inputs=[chatbot, db, retrieved_docs, k_documents],
|
190 |
-
outputs=[retrieved_docs],
|
191 |
-
queue=True,
|
192 |
).success(
|
193 |
fn=bot,
|
194 |
inputs=[
|
195 |
chatbot,
|
196 |
system_prompt,
|
197 |
-
conversation_id,
|
198 |
-
retrieved_docs,
|
199 |
top_p,
|
200 |
top_k,
|
201 |
temp
|
|
|
55 |
top_p,
|
56 |
top_k,
|
57 |
temp
|
58 |
+
):
|
59 |
tokens = get_system_tokens(model)[:]
|
60 |
tokens.append(LINEBREAK_TOKEN)
|
61 |
|
|
|
155 |
# Pressing Enter
|
156 |
submit_event = msg.submit(
|
157 |
fn=user,
|
158 |
+
inputs=[msg, chatbot],
|
159 |
outputs=[msg, chatbot],
|
160 |
queue=False,
|
|
|
|
|
|
|
|
|
|
|
161 |
).success(
|
162 |
fn=bot,
|
163 |
inputs=[
|
164 |
chatbot,
|
165 |
system_prompt,
|
|
|
|
|
166 |
top_p,
|
167 |
top_k,
|
168 |
temp
|
|
|
177 |
inputs=[msg, chatbot, system_prompt],
|
178 |
outputs=[msg, chatbot],
|
179 |
queue=False,
|
|
|
|
|
|
|
|
|
|
|
180 |
).success(
|
181 |
fn=bot,
|
182 |
inputs=[
|
183 |
chatbot,
|
184 |
system_prompt,
|
|
|
|
|
185 |
top_p,
|
186 |
top_k,
|
187 |
temp
|