Hi, I want to remove the βclearβ button in Gradio Interface.
Is there a way to do such a thing?
You may use Gradio blocks instead of Interface.
import gradio as gr
import os
def 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])
if name == βmainβ:
demo.launch()
https://digitalpress.fra1.cdn.digitaloceanspaces.com/mhujhsj/2022/09/button.gif
2 Likes