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
34.23k stars 2.6k forks source link

ChatInterface aditional params when open>close height of the chatbot goes more tall than the initial height #8771

Open pabl-o-ce opened 4 months ago

pabl-o-ce commented 4 months ago

Describe the bug

1) your ui initial start is like this (perfect):

Screen Shot 2024-07-12 at 8 23 19 PM

2) whenever you open additional inputs and then closed then height end like this:

Screen Shot 2024-07-12 at 8 29 11 PM

in terms of UX is no functional.

Nevertheless thank you for your work just adding this bug

Have you searched existing issues? 🔎

Reproduction

import gradio as gr
demo = gr.ChatInterface(
    respond,
    additional_inputs=[
        gr.Dropdown([
                'Meta-Llama-3-70B-Instruct-Q3_K_M.gguf',
                'gemma-2-27b-it-Q8_0.gguf'
            ],
            value="gemma-2-27b-it-Q8_0.gguf",
            label="Model"
        ),
        gr.Textbox(value="You are a helpful assistant.", label="System message"),
        gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
        gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
        gr.Slider(
            minimum=0.1,
            maximum=1.0,
            value=0.95,
            step=0.05,
            label="Top-p",
        ),
        gr.Slider(
            minimum=0,
            maximum=100,
            value=40,
            step=1,
            label="Top-k",
        ),
        gr.Slider(
            minimum=0.0,
            maximum=2.0,
            value=1.1,
            step=0.1,
            label="Repetition penalty",
        ),
    ],
    description="Llama-cpp-agent: Chat multi llm selection",
    chatbot=gr.Chatbot(
        scale=1, 
        placeholder=PLACEHOLDER,
        likeable=False,
        show_copy_button=True
    )
)

Screenshot

No response

Logs

No response

System Info

latest version and oldest version for what I have been using

Severity

I can work around it

abidlabs commented 1 month ago

Hi, apologies for the late follow up. We haven't had a chance to look into this issue yet, but the Gradio codebase has changed quite significantly since this issue was created, particularly with the release of Gradio 5. Could you let us know if this is still an issue in the latest version of Gradio (pip install --upgrade gradio)? Thanks!

If its still an issue, can you please provide a standalone repro that doesn't depend on external functions / variables?

pabl-o-ce commented 1 month ago

Hello @abidlabs,

That is so cool I have seen the updates but haven't time to test it.

Let me in this week take a look with the new latest version.

Also thank u for your response.

pabl-o-ce commented 2 weeks ago

Hi @abidlabs

I tested in the new current version 5.5.0 here

but keep making this extra height whenever you open additional inputs and then closed.

also now in the placeholder html the ssr remove the images and svg (any tip is always welcome)