I suspect there may be an issue with the Examples mechanism when using the gr.Gallery component. The same Examples implementation works perfectly with the gr.Image component. Here's a detailed explanation of the issue:
Recently, I updated my Gradio application by replacing the gr.Image component with gr.Gallery. However, this resulted in a PermissionError: [Errno 13] Permission denied: 'C:\\my\\path'.
Upon investigation, it appears that the issue may be related to the component.as_example(ex) function in gradio\components\dataset.py.
To debug, I added a print statement in the __init__ method of dataset.py. Below are the console logs for comparison:
Describe the bug
Hi Gradio Development Team,
I suspect there may be an issue with the
Examples
mechanism when using thegr.Gallery
component. The sameExamples
implementation works perfectly with thegr.Image
component. Here's a detailed explanation of the issue:Recently, I updated my Gradio application by replacing the
gr.Image
component withgr.Gallery
. However, this resulted in aPermissionError: [Errno 13] Permission denied: 'C:\\my\\path'
.Upon investigation, it appears that the issue may be related to the
component.as_example(ex)
function ingradio\components\dataset.py
.To debug, I added a print statement in the
__init__
method ofdataset.py
. Below are the console logs for comparison:When using
gr.Image
, the console log shows:When using
gr.Gallery
, the console log shows:Could you please help investigate and confirm this behavior? Thank you!
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio