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

Setting height on gr.File() has no effect #10184

Closed
1 task done
libokj opened this issue Dec 11, 2024 · 0 comments · Fixed by #10209
Closed
1 task done

Setting height on gr.File() has no effect #10184

libokj opened this issue Dec 11, 2024 · 0 comments · Fixed by #10209
Labels
bug Something isn't working

Comments

@libokj
Copy link

libokj commented Dec 11, 2024

Describe the bug

According to the documentation, height argument of gr.File() is:

The default height of the file component when no files have been uploaded, or the maximum height of the file component when files are present. Specified in pixels if a number is passed, or in CSS units if a string is passed. If more files are uploaded than can fit in the height, a scrollbar will appear.

This feature was introduced in the 4.x, but it seems to take no effect on the newest version (5.8.0).

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
with gr.Blocks() as demo:
    file = gr.File(
        label='File', file_count='single', interactive=True, visible=True,
        height=50,
    )
demo.launch()

Screenshot

No response

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 5.8.0
gradio_client version: 1.5.1

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

aiofiles: 23.2.1
anyio: 4.6.2
audioop-lts is not installed.
fastapi: 0.115.6
ffmpy: 0.4.0
gradio-client==1.5.1 is not installed.
httpx: 0.27.0
huggingface-hub: 0.26.5
jinja2: 3.1.4
markupsafe: 2.1.3
numpy: 1.23.5
orjson: 3.10.12
packaging: 24.1
pandas: 2.2.3
pillow: 10.2.0
pydantic: 2.10.3
pydub: 0.25.1
python-multipart: 0.0.19
pyyaml: 6.0.2
ruff: 0.8.2
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.41.3
tomlkit: 0.13.2
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 2.2.3
uvicorn: 0.32.1
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.0
huggingface-hub: 0.26.5
packaging: 24.1
typing-extensions: 4.12.2
websockets: 14.1

Severity

I can work around it

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

Successfully merging a pull request may close this issue.

1 participant