gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
32.21k stars 2.41k forks source link

TabbedInterface nested with ChatInterface, the height of the ChatInterface is always 200px #7989

Open fanjianing opened 5 months ago

fanjianing commented 5 months ago

Describe the bug

When trying the TabbedInterface nested with ChatInterface, the height of the ChatInterface is always 200px. How to solve it?

Code Demo 1:

with gr.Blocks(fill_height=True) as block:
    gr.TabbedInterface(
    [moonshot_chat, claude3_chat],
    ["Moonshot", "Claude3 Sonnet Chat"],
    title="LLM Console",
    )
block.launch()

Code Demo 2:

app = gr.TabbedInterface(
    [moonshot_chat, claude3_chat],
    ["Moonshot", "Claude3 Sonnet Chat"],
    title="LLM Console",
    )
app.launch()

No matter what kind of code it is, it will always be this fixed height. How can it be made the same as the browser height?

image

I tried a method of replacing css, it worked! but the id of the corresponding element in each tab is different, which is very inconvenient.

app = gr.TabbedInterface(
    [moonshot_chat, claude3_chat],
    ["Moonshot", "Claude3 Sonnet Chat"],
    title="LLM Console",
    css=".block  .svelte-12cmxck { height:calc(100vh - 380px)!important; }"
    )

Have you searched existing issues? 🔎

Reproduction

import gradio as gr

Screenshot

No response

Logs

No response

System Info

gradio version = 4.26.0

Severity

I can work around it

xkbang commented 1 month ago

Same here

NatromeTex commented 6 days ago

this work around works with tabbedInterface but not with normal tabs.