Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misplaced Chat Avatar While Thinking #10564

Open
1 task done
CarterYancey opened this issue Feb 11, 2025 · 0 comments
Open
1 task done

Misplaced Chat Avatar While Thinking #10564

CarterYancey opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working 💬 Chatbot Related to the Chatbot component

Comments

@CarterYancey
Copy link

CarterYancey commented Feb 11, 2025

Describe the bug

When the chatbot is thinking, the Avatar icon is misplaced. When it is actually inferencing or done inferencing, the avatar is fine.

Similar to #9655 I believe, but a special edge case. Also, I mostly notice the issue with rectangular images.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
from time import sleep
AVATAR = "./car.png"

# Define a simple chatbot function

def chatbot_response(message, hist):
    sleep(10)
    return f"Gradio is pretty cool!"

# Create a chat interface using gr.ChatInterface
chatbot = gr.ChatInterface(fn=chatbot_response,
   chatbot=gr.Chatbot(
    label="LLM",
    elem_id="chatbot",
    avatar_images=(
        None,
        AVATAR
        ),
        )   
    )

# Launch the chatbot
chatbot.launch()

Screenshot

Image

Image
Image

Logs

System Info

(base) carter.yancey@Yancy-XPS:~$ gradio environment
Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 5.13.1
gradio_client version: 1.6.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
anyio: 3.7.1
audioop-lts is not installed.
fastapi: 0.115.7
ffmpy: 0.3.2
gradio-client==1.6.0 is not installed.
httpx: 0.25.1
huggingface-hub: 0.27.1
jinja2: 3.1.2
markupsafe: 2.1.3
numpy: 1.26.2
orjson: 3.9.10
packaging: 23.2
pandas: 1.5.3
pillow: 10.0.0
pydantic: 2.5.1
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.1
ruff: 0.2.2
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.45.3
tomlkit: 0.12.0
typer: 0.15.1
typing-extensions: 4.8.0
urllib3: 2.3.0
uvicorn: 0.24.0.post1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.10.0
httpx: 0.25.1
huggingface-hub: 0.27.1
packaging: 23.2
typing-extensions: 4.8.0
websockets: 11.0.3

Severity

I can work around it

@CarterYancey CarterYancey added the bug Something isn't working label Feb 11, 2025
@abidlabs abidlabs added the 💬 Chatbot Related to the Chatbot component label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💬 Chatbot Related to the Chatbot component
Projects
None yet
Development

No branches or pull requests

2 participants