mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
0dccf825c4
* Add step parameter to slider * fix demos * changes * tweaks to demo --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
14 lines
237 B
Python
14 lines
237 B
Python
import gradio as gr
|
|
|
|
def greet(name, intensity):
|
|
return "Hello, " + name + "!" * int(intensity)
|
|
|
|
demo = gr.Interface(
|
|
fn=greet,
|
|
inputs=["text", "slider"],
|
|
outputs=["text"],
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|