Download interface.py from Abhlash/BurnerBot: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/Abhlash/BurnerBot/resolve/main/interface.py
- Command line
-
hf download hf://spaces/Abhlash/BurnerBot/interface.py
-
curl -L -o interface.py https://huggingface.co/spaces/Abhlash/BurnerBot/resolve/main/interface.py
491 Bytes
| import gradio as gr | |
| from bot.chat import bot | |
| def create_interface(): | |
| with gr.Blocks() as demo: | |
| chatbot = gr.Chatbot() | |
| msg = gr.Textbox() | |
| clear = gr.Button("Clear") | |
| def user(user_message, history): | |
| return "", history + [[user_message, None]] | |
| msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then( | |
| bot, chatbot, chatbot | |
| ) | |
| clear.click(lambda: None, None, chatbot, queue=False) | |
| return demo | |