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
30.56k stars 2.27k forks source link

Issue with gr.ImageEditor in Gradio Application #8556

Open rybakov-ks opened 1 week ago

rybakov-ks commented 1 week ago

Describe the bug

We have encountered an issue with the 'gr.ImageEditor' component in a Gradio application. The problem occurs when the application is accessed via a mobile browser and a photo taken with the phone's camera (4032x3024, 1.9 MB, iPhone 12) is uploaded. Upon attempting to upload this image, the page automatically reloads, disrupting the user experience. However, smaller images (e.g., 1170x3532, 109 KB) upload without problems.

Have you searched existing issues? 🔎

Reproduction

import gradio as gr

demo = gr.Blocks() 

with demo:
    image_input = gr.ImageEditor()

demo.launch()

Screenshot

No response

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.36.1
gradio_client version: 1.0.1

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

aiofiles: 22.1.0
altair: 5.0.1
fastapi: 0.100.1
ffmpy: 0.3.1
gradio-client==1.0.1 is not installed.
httpx: 0.24.1
huggingface-hub: 0.22.2
importlib-resources: 6.4.0
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.7.2
numpy: 1.26.2
orjson: 3.9.2
packaging: 23.1
pandas: 1.5.3
pillow: 8.4.0
pydantic: 2.6.1
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.4.1
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.3
typing-extensions: 4.7.1
urllib3: 2.2.1
uvicorn: 0.23.2
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.

gradio_client dependencies in your environment:

fsspec: 2023.6.0
httpx: 0.24.1
huggingface-hub: 0.22.2
packaging: 23.1
typing-extensions: 4.7.1
websockets: 11.0.3

Severity

I can work around it