ZeppFusion / app.py
Xyro123's picture
Update app.py
00e3c78 verified
raw
history blame
446 Bytes
import gradio as gr
def respond(message, chat_history):
if chat_history is None:
chat_history = []
# Энгийн reply
reply = f"Чи бичсэн: {message}"
chat_history.append((message, reply))
return chat_history, chat_history
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox(label="Message")
state = gr.State()
msg.submit(respond, [msg, state], [chatbot, state])
demo.launch()