Skip to content

Dataframe component overflowing from the tab #1196

@merveenoyan

Description

@merveenoyan

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Dataframe component overflows from the tab even if the page is 75 percent zoomed out.
Ekran Resmi 2022-05-09 16 31 07

Reproduction

My code is below:

import gradio as gr
df = [i for i in range(8)]
def inference_function_xgb(df):
    print(df)
def inference_function_rfc(df):
    print(df)

outcome = gr.outputs.Textbox()

with gr.Blocks() as demo:
    
    with gr.Tabs():
        with gr.TabItem("XGBoost") as xgb:
            with gr.Row():
                df = gr.Dataframe(interactive=True, headers=[i for i in range(8)], type = "pandas")
                inference_run = gr.Button("Infer")
                inference_progress = gr.StatusTracker(cover_container=True)
                inference_run.click(
                    inference_function_xgb,
                    inputs=df,
                    outputs=outcome,
                    status_tracker=inference_progress,
                )
        with gr.TabItem("Random Forest Classifier") as rfc:
            with gr.Row():
                df = gr.Dataframe(interactive=True, headers=[i for i in range(8)], type = "pandas")
                inference_run = gr.Button("Infer")
                inference_progress = gr.StatusTracker(cover_container=True)
                inference_run.click(
                    inference_function_rfc,
                    inputs=df,
                    outputs=outcome,
                    status_tracker=inference_progress,
                )

if __name__ == "__main__":
    demo.launch()

it's dummified, but still reproduces the error :')

Screenshot

Posted above.

Logs

App works just fine :')

System Info

gradio==2.9b25

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions