BasilTh
Deploy latest SLM customer-support chatbot
a621f88
raw
history blame
354 Bytes
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()