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

Column names don't wrap with gradio==5.5.0 #9937

Closed
1 task done
x-tabdeveloping opened this issue Nov 11, 2024 · 1 comment · Fixed by #9949
Closed
1 task done

Column names don't wrap with gradio==5.5.0 #9937

x-tabdeveloping opened this issue Nov 11, 2024 · 1 comment · Fixed by #9949
Labels
bug Something isn't working 💾 Dataframe

Comments

@x-tabdeveloping
Copy link

Describe the bug

When I make a DataFrame with newer versions of Gradio, there is no way to wrap column names into multiple lines.
If I set wrap==True , nothing happens with the column names, nor if I set column widths.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
import pandas as pd

df = pd.DataFrame(
    {
        "Very long column name, something I would want to wrap into multiple lines": [
            "value1",
            "value2",
            "value3",
            "value4",
        ],
        "Another long column name, something I would want to wrap into multiple lines": [
            "value1",
            "value2",
            "value3",
            "value4",
        ],
        "A third long column name, something I would want to wrap into multiple lines": [
            "value1",
            "value2",
            "value3",
            "value4",
        ],
    }
)

with gr.Blocks() as demo:
    gr.DataFrame(df)
    # If I set wrap=True, then the columns fit on screen but the names don't get wrapped
    # If I set column_widths=["50px", "50px", "50px"], nothing happens, not even when wrap=True

demo.launch()

Screenshot

image

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 5.5.0
gradio_client version: 1.4.2

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

aiofiles: 23.2.1
anyio: 4.4.0
audioop-lts is not installed.
fastapi: 0.115.4
ffmpy: 0.4.0
gradio-client==1.4.2 is not installed.
httpx: 0.27.2
huggingface-hub: 0.26.1
jinja2: 3.1.3
markupsafe: 2.1.5
numpy: 1.25.2
orjson: 3.10.7
packaging: 24.0
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.7.0
pydub: 0.25.1
python-multipart==0.0.12 is not installed.
pyyaml: 6.0.1
ruff: 0.3.7
safehttpx: 0.1.1
semantic-version: 2.10.0
starlette: 0.41.2
tomlkit==0.12.0 is not installed.
typer: 0.12.5
typing-extensions: 4.11.0
urllib3: 2.2.1
uvicorn: 0.30.6
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2024.2.0
httpx: 0.27.2
huggingface-hub: 0.26.1
packaging: 24.0
typing-extensions: 4.11.0
websockets: 12.0


### Severity

Blocking usage of gradio
@x-tabdeveloping x-tabdeveloping added the bug Something isn't working label Nov 11, 2024
@x-tabdeveloping
Copy link
Author

#7352 Is somewhat similar to this, except I would like things to wrap automatically. This was not a problem in version 4.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💾 Dataframe
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants