gradio/demo/interface_series/run.py
Freddy Boulton 600722c218
Add examples for series and parallel (#1738)
* Add examples for series and parallel

* Add ML demos for interface and load
2022-07-11 11:21:30 -04:00

10 lines
458 B
Python

import gradio as gr
get_name = gr.Interface(lambda name: name, inputs="textbox", outputs="textbox")
prepend_hello = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs="textbox")
append_nice = gr.Interface(lambda greeting: f"{greeting} Nice to meet you!",
inputs="textbox", outputs=gr.Textbox(label="Greeting"))
demo = gr.Series(get_name, prepend_hello, append_nice)
if __name__ == "__main__":
demo.launch()