Spaces:
Runtime error
Runtime error
KvrParaskevi
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -11,12 +11,11 @@ with gr.Blocks() as demo:
|
|
11 |
|
12 |
def bot(history):
|
13 |
print("Question: ", history[-1][0])
|
14 |
-
llm_chain.run(question=history[-1][0])
|
|
|
15 |
history[-1][1] = ""
|
16 |
-
|
17 |
-
|
18 |
-
history[-1][1] += character
|
19 |
-
yield history
|
20 |
|
21 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(bot, chatbot, chatbot)
|
22 |
clear.click(lambda: None, None, chatbot, queue=False)
|
|
|
11 |
|
12 |
def bot(history):
|
13 |
print("Question: ", history[-1][0])
|
14 |
+
bot_message = llm_chain.run(question=history[-1][0])
|
15 |
+
print("Response: ", bot_message)
|
16 |
history[-1][1] = ""
|
17 |
+
history[-1][1] += bot_message
|
18 |
+
return history
|
|
|
|
|
19 |
|
20 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(bot, chatbot, chatbot)
|
21 |
clear.click(lambda: None, None, chatbot, queue=False)
|