minigpt / app.py
Murali Chandran
making it public
8c13eae
Raw History Blame Contribute Delete
521 Bytes
import gradio as gr
from bot_inference import chatbot_reply
with gr.Blocks() as demo:
gr.Markdown("## 🤖 MiniGPT Addition Chatbot")
chatbox = gr.Chatbot()
msg = gr.Textbox(label="Enter your math request")
clear = gr.Button("Clear")
def respond(user, history):
bot = chatbot_reply(user)
history.append((user, bot))
return history, ""
msg.submit(respond, [msg, chatbox], [chatbox, msg])
clear.click(lambda: None, None, chatbox, queue=False)
demo.launch(share=True)