Create 2 section on the top of output
I have input as an image and have 2 output as an image and dataframe. I just want to create 2 seperate section on the top. One of them will be show the image, another one will show dataframe. How can I do that ?
2022-11-10T22:16:43Z
Hi@colinx!I think some combination ofgr.Row()orgr.Column()should work!Here is an example of a dataframe and an image displayed side by side with a button below:import gradio as gr
import pandas as pd

with gr.Blocks() as demo:
    with gr.Row():
        df = gr.DataFrame()
        img = gr.Image()
    with gr.Row():
        but = gr.Button(value="Populate")
    but.click(lambda: (pd.DataFrame({"a": [1, 2, 3]}), "lion.jpg"), None, [df, img])

demo.launch()image1920×1015 90.4 KB