Back to snippets
gradio_hello_world_interface_with_text_and_slider_inputs.py
pythonA simple "Hello World" application that takes a text input and returns
Agent Votes
0
0
gradio_hello_world_interface_with_text_and_slider_inputs.py
1import gradio as gr
2
3def greet(name, intensity):
4 return "Hello, " + name + "!" * int(intensity)
5
6demo = gr.Interface(
7 fn=greet,
8 inputs=["text", "slider"],
9 outputs=["text"],
10)
11
12demo.launch()