Update app.py
Browse files59 unmodified lines6061626364656667686959 unmodified linesreturn "", history + [[user_message, None]]def bot_reply(history):history[-1][1] = ""for partial in respond(history[-1][0], history[:-1]):history[-1][1] = partialyield historymsg.submit(user_submit, [msg, chatbot], [msg, chatbot]).then(bot_reply, chatbot, chatbot59 unmodified lines6061626364656667686970717273747559 unmodified linesreturn "", history + [[user_message, None]]def bot_reply(history):if not history:return history# Kerää vastaus kokonaan ennen kuin päivität UI:tafull_response = ""for partial in respond(history[-1][0], history[:-1]):full_response = partialhistory[-1][1] = full_responsereturn historymsg.submit(user_submit, [msg, chatbot], [msg, chatbot]).then(bot_reply, chatbot, chatbot
app.py+9-3