Spaces:
Sleeping
Sleeping
Download app.py from codeninja3d/minigpt: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/spaces/codeninja3d/minigpt/resolve/main/app.py
- Command line
-
hf download hf://spaces/codeninja3d/minigpt/app.py
-
curl -L -o app.py https://huggingface.co/spaces/codeninja3d/minigpt/resolve/main/app.py
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) | |