Created
April 28, 2023 19:01
-
-
Save sunilkumardash9/1d9ec63683723747c42bbffd3ffccb78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gradio as gr | |
def greet(name): | |
return"Hello " + name + "!" | |
with gr.Blocks() as demo: | |
name = gr.Textbox(label="Name") | |
output = gr.Textbox(label="Output Box") | |
greet_btn = gr.Button("Greet") | |
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet") | |
demo.launch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment