DemoOfDemos / app.py
lbiester's picture
Update app.py
9afe62f verified
raw
history blame
565 Bytes
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
with demo:
gr.Markdown("Flip text or image files using this demo.")
with gr.Tabs():
with gr.TabItem("Flip Text"):
with gr.Row():
text_input = gr.Textbox()
text_output = gr.Textbox()
text_button = gr.Button("Flip")
with gr.TabItem("Flip Image"):
interface = gr.Interface(fn=greet, inputs="text", outputs="text")
text_button.click(flip_text, inputs=text_input, outputs=text_output)
demo.launch()