File size: 354 Bytes
e0d439e a621f88 e0d439e a621f88 e0d439e |
1 2 3 4 5 6 7 8 9 10 11 |
import gradio as gr
from module import chat_with_memory
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
txt = gr.Textbox(placeholder="Type your message and press ⏎")
txt.submit(lambda msg, hist: (None, hist + [[msg, chat_with_memory(msg)]]),
[txt, chatbot], [txt, chatbot])
if __name__ == "__main__":
demo.launch()
|