| import gradio as gr | |
| def greet(name): | |
| return f"Привет, {name}!" | |
| with gr.Blocks(title="Test") as demo: | |
| gr.Markdown("# It works!") | |
| name = gr.Textbox(label="Your name") | |
| output = gr.Textbox(label="Output") | |
| btn = gr.Button("Run") | |
| btn.click(fn=greet, inputs=name, outputs=output) | |
| demo.launch() |