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

gr.File() and gr.Model3D don't accept DnD (drag and drop) input #6490

Closed
1 task done
whitphx opened this issue Nov 19, 2023 · 0 comments · Fixed by #6525
Closed
1 task done

gr.File() and gr.Model3D don't accept DnD (drag and drop) input #6490

whitphx opened this issue Nov 19, 2023 · 0 comments · Fixed by #6525
Assignees
Labels
bug Something isn't working

Comments

@whitphx
Copy link
Member

whitphx commented Nov 19, 2023

Describe the bug

You can't DnD files to gr.File and gr.Model3D to feed the inputs even though the components say "Drop File Here" and the input file type is acceptable by each component which is proven that you can select such files from the dialog.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

def noop(*args):
    return None

demo = gr.Interface(
    fn=noop,
    inputs=[gr.File(), gr.Model3D(), gr.Image()],
    outputs=None,
)

demo.launch()

On gr.File and gr.Model3D, the DnD file input doesn't work while file-select dialog works. gr.Image is just for comparison on which both work.

CleanShot.2023-11-19.at.19.14.08.mp4

Screenshot

No response

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 4.4.1
gradio_client version: 0.7.0

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

aiofiles: 23.1.0
altair: 5.0.1
fastapi: 0.104.1
ffmpy: 0.3.0
gradio-client==0.7.0 is not installed.
httpx: 0.24.1
huggingface-hub: 0.14.1
importlib-resources: 6.1.0
jinja2: 3.1.2
markupsafe: 2.1.2
matplotlib: 3.7.1
numpy: 1.24.3
orjson: 3.8.14
packaging: 23.1
pandas: 2.0.2
pillow: 9.5.0
pydantic: 2.5.0
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0
requests: 2.31.0
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.8.0
uvicorn: 0.22.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.5.0
httpx: 0.24.1
huggingface-hub: 0.14.1
packaging: 23.1
requests: 2.31.0
typing-extensions: 4.8.0
websockets: 11.0.3

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.

2 participants