anferico's picture
second commit
e26ca46
raw
history blame
494 Bytes
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
textbox = gr.Textbox(
placeholder="secret", label="Secret", show_label=True, visible=False
)
def enable_second_task(secret):
if secret == "lol":
return gr.Textbox.update(visible=True)
return gr.Textbox.update(visible=False)
submit_button = gr.Button("Submit")
submit_button.click(enable_second_task, textbox, textbox)
iface = gr.Interface(fn=greet, inputs=[textbox], outputs="text")
iface.launch()