gradio/demo/hello_world_4/run.py
Ari Roffe 0dccf825c4
Add step parameter to slider (#7399)
* Add step parameter to slider

* fix demos

* changes

* tweaks to demo

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-02-12 10:06:46 -08:00

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()