import gradio as gr def process_text(text): return text def process_image(image): return "image processed successfully" def process_audio(audio): return "audio processed successfully" with gr.Blocks() as iface: gr.Markdown("# this is my demo for tab feature") with gr.Tab("process Text"): text_input = gr.Textbox() text_output = gr.Textbox() text_button = gr.Button("process text") with gr.Tab("process Image"): image_input = gr.Image() image_output = gr.Textbox() image_button = gr.Button("process image") with gr.Tab("process Audio"): audio_input = gr.Audio() audio_output = gr.Textbox() audio_button = gr.Button("process audio") text_button.click(process_text, inputs=text_input, outputs=text_output) image_button.click(process_image, inputs=image_input, outputs=image_output) audio_button.click(process_audio, inputs=audio_input, outputs=audio_output) iface.launch()