File size: 295 Bytes
a03b3ba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
def greet(name, intensity):
return "Hello " * intensity + name + "!"
demo = gr.Interface(
fn=greet,
inputs=["text", gr.Slider(value=2, minimum=1, maximum=10)],
outputs=[gr.Textbox(label="greeting", lines=3)],
)
if __name__ == "__main__":
demo.launch()
|