import gradio as gr | |
with gr.Blocks() as demo: | |
chat = gr.Chatbot() | |
text = gr.Textbox() | |
def add(new_text, history): | |
return history + [[new_text, "yes"]] | |
text.submit(add, [text, chat], chat) | |
gr.LoginButton() | |
demo.launch() |
import gradio as gr | |
with gr.Blocks() as demo: | |
chat = gr.Chatbot() | |
text = gr.Textbox() | |
def add(new_text, history): | |
return history + [[new_text, "yes"]] | |
text.submit(add, [text, chat], chat) | |
gr.LoginButton() | |
demo.launch() |