gradio/demo/hello_world.py

9 lines
179 B
Python
Raw Normal View History

2020-10-27 06:27:28 +08:00
import gradio as gr
def greet(name):
2021-05-22 12:41:38 +08:00
return "Hello " + name + "!!"
2020-10-27 06:27:28 +08:00
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
if __name__ == "__main__":
2021-05-22 12:41:38 +08:00
iface.launch()