File size: 565 Bytes
f9706ce
 
 
 
 
9afe62f
 
 
 
 
 
 
 
 
 
 
 
 
f9706ce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()