Spaces:
No application file
No application file
| import gradio as gr | |
| def great(name:str, times: float)-> str: | |
| return f"Hello {name}! " * int(times) | |
| with gr.Blocks(title = "App") as demo: | |
| gr.Markdown('# Greeting App') | |
| with gr.Row(): | |
| name = gr.Textbox(label="Name", placeholder="Enter your name here") | |
| times = gr.Number(label="Times", value=1) | |
| with gr.Row(): | |
| btn = gr.Button("Greet") | |
| out = gr.Textbox(label="Output", interactive=False) | |
| btn.click(great, inputs=[name, times], outputs = out) | |
| demo.launch() | |