How can I remove "clear" button in Gradio Interface?
Hi, I want to remove the “clear” button in Gradio Interface.Is there a way to do such a thing?
2023-04-25T08:24:12Z
You may use Gradio blocks instead of Interface.import gradio as grimport osdef combine(a, b):return “Hey! " + a + " " + b + ‘\n’+ " Welcome to Machine Learning Nuggets.”with gr.Blocks() as demo:txt = gr.Textbox(label="First Name", lines=2)
txt_2 = gr.Textbox(label="Second Name")
txt_3 = gr.Textbox(value="", label="Output")
btn = gr.Button(value="Submit")
btn.click(combine, inputs=[txt, txt_2], outputs=[txt_3])ifname== “main”:demo.launch()https://digitalpress.fra1.cdn.digitaloceanspaces.com/mhujhsj/2022/09/button.gif