You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If my image in the gallery module is a URL, then I cannot do drag and drop. But if the image is a local image or an uploaded one, then the drag-and-drop function works as expected.
Hi @Hantang-Li I don't understand this issue. Can you include a GIF showing what you are trying to do? It would be great if you can include both examples, one where it is working properly and one where it is not. Thanks
Hi @Hantang-Li. I looked into this and I believe that its a browser issue, not a Gradio issue, that prevents dragging and dropping certain kinds of images.
As a workaround, you can use the .select() event of the Gallery component to have the image populate when you click on it. I put together a quick example for you:
Describe the bug
If my image in the gallery module is a URL, then I cannot do drag and drop. But if the image is a local image or an uploaded one, then the drag-and-drop function works as expected.
I have reproduced the bug below.
Is there an existing issue for this?
Reproduction
import gradio as gr
def predict(inp):
return [inp]
gr.Interface(fn=predict,
inputs=gr.Image(type="pil"),
outputs=gr.Gallery(value=["https://raw.githubusercontent.com/gradio-app/gradio/main/readme_files/header-image.jpg"])).launch(show_api=False, server_name="0.0.0.0", server_port=80, debug=True)
Screenshot
No response
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: