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
33.77k stars 2.56k forks source link

Conflict between dataframe height and gr.Row() #6687

Closed pcschreiber1 closed 2 weeks ago

pcschreiber1 commented 11 months ago

Describe the bug

When I place a large gr.DataFrame inside a gr.Row() element and set the height argument to a high number, a large field appears but inside the Dataframe table stays the same size.

When I manually zoom-out (e.g. to 50%) the component is displayed as it should be.

Objective: I would like to be able to show a large table without table zoom inside a complex layout

Have you searched existing issues? 🔎

Reproduction

import gradio as gr
import pandas as pd

text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." * 10

with gr.Blocks() as demo:
    with gr.Row():
        gr.DataFrame(pd.DataFrame({"Col1": [text]*10, "Col2": [text]*10}), wrap=True, height=99999)
demo.launch()

Screenshot

image

image

Logs

No response

System Info

WSL2 Ubuntu in Windows 10

Name: gradio
Version: 4.7.1

aiofiles==23.1.0
aiohttp==3.8.5
aiosignal==1.3.1
altair==5.0.1
annotated-types==0.5.0
anyio==3.7.1
asttokens==2.2.1
async-timeout==4.0.2
attrs==23.1.0
backcall==0.2.0
beautifulsoup4==4.12.2
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.6
cmake==3.27.1
colorama==0.4.6
comm==0.1.4
contourpy==1.1.0
cryptography==41.0.3
cycler==0.11.0
debugpy==1.6.7.post1
decorator==5.1.1
deep-translator==1.11.4
deepl==1.16.1
dnspython==2.4.1
docopt==0.6.2
emoji==2.8.0
exceptiongroup==1.1.2
executing==1.2.0
fastapi==0.100.0
ffmpy==0.3.1
filelock==3.12.2
fonttools==4.42.0
frozenlist==1.4.0
fsspec==2023.6.0
gradio==4.7.1
gradio_client==0.7.0
h11==0.14.0
httpcore==0.17.3
httpx==0.24.1
huggingface-hub==0.16.4
idna==3.4
importlib-resources==6.1.1
ipykernel==6.25.1
ipython==8.14.0
jedi==0.19.0
Jinja2==3.1.2
joblib==1.3.1
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
jupyter_client==8.3.0
jupyter_core==5.3.1
kiwisolver==1.4.4
linkify-it-py==2.0.2
lit==16.0.6
loguru==0.7.0
markdown-it-py==2.2.0
MarkupSafe==2.1.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
mdit-py-plugins==0.3.3
mdurl==0.1.2
mpmath==1.3.0
multidict==6.0.4
nest-asyncio==1.5.7
networkx==3.1
nltk==3.8
numpy==1.25.2
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-cupti-cu11==11.7.101
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
nvidia-cufft-cu11==10.9.0.58
nvidia-curand-cu11==10.2.10.91
nvidia-cusolver-cu11==11.4.0.1
nvidia-cusparse-cu11==11.7.4.91
nvidia-nccl-cu11==2.14.3
nvidia-nvtx-cu11==11.7.91
orjson==3.9.4
packaging==23.1
pandas==2.0.3
parso==0.8.3
pdfminer.six==20221105
pdfplumber==0.9.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
pinecone-client==2.2.0
pipreqs==0.4.13
platformdirs==3.10.0
prompt-toolkit==3.0.39
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pydantic==2.1.1
pydantic_core==2.4.0
pydub==0.25.1
Pygments==2.16.1
pyparsing==3.0.9
pypdf==3.17.1
python-dateutil==2.8.2
python-dotenv==1.0.0
python-multipart==0.0.6
pytz==2023.3
PyYAML==6.0.1
pyzmq==25.1.0
referencing==0.30.2
regex==2023.8.8
requests==2.31.0
rich==13.7.0
rpds-py==0.9.2
safetensors==0.3.2
scikit-learn==1.3.0
scipy==1.11.1
semantic-version==2.10.0
sentence-transformers==2.2.2
sentencepiece==0.1.99
shellingham==1.5.4
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
stack-data==0.6.2
starlette==0.27.0
sympy==1.12
threadpoolctl==3.2.0
tokenizers==0.13.3
tomlkit==0.12.0
toolz==0.12.0
torch==2.0.1
torchvision==0.15.2
tornado==6.3.2
tqdm==4.65.2
traitlets==5.9.0
transformers==4.31.0
triton==2.0.0
typer==0.9.0
typing_extensions==4.7.1
tzdata==2023.3
uc-micro-py==1.0.2
urllib3==2.0.4
uvicorn==0.23.2
Wand==0.6.11
wcwidth==0.2.6
websockets==11.0.3
yarg==0.1.9
yarl==1.9.2

Severity

I can work around it

kushal-10 commented 6 months ago

Any updates on this? The same thing happens for me on a smaller screen (mobile resolution). I tried using this in and out of gr.Row(), in both cases it shows the blank space Screenshot from 2024-04-22 02-21-07

abidlabs commented 3 weeks ago

Hi, apologies for the late follow up. We haven't had a chance to look into this issue, 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!

abidlabs commented 2 weeks ago

Closing the issue for now, but can reopen if needed