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
raise return_result
File "/Users/freddy/miniconda3/envs/gradio/lib/python3.8/site-packages/fsspec/asyn.py", line 53, in _runner
result[0] = await coro
File "/Users/freddy/sources/gradio/gradio/helpers.py", line 278, in create
await self.cache()
File "/Users/freddy/sources/gradio/gradio/helpers.py", line 318, in cache
cache_logger.flag(output)
File "/Users/freddy/sources/gradio/gradio/flagging.py", line 218, in flag
component.deserialize(sample, save_dir=save_dir)
File "/Users/freddy/sources/gradio/client/python/gradio_client/serializing.py", line 164, in deserialize
raise ValueError(
ValueError: A FileSerializable component can only deserialize a string or a dict, not a: <class 'list'>
(gradio)
System Info
Latest but happens in other versions, e.g. 3.19
Severity
serious, but I can work around it
The text was updated successfully, but these errors were encountered:
We should create a new Serializer class for the File and UploadButton component (maybe called MultiFileSerializer) that can handle both single files and lists of files. I've started creating new Serializer classes here: #3663. We can add this one there, WDYT @freddyaboulton?
Would the File and UploadButton components inherit from both then?
I’m thinking the FileSerializer should be made more general such that the multiple vs single file cases are handled the same way. We can make this backwards compatible and non-breaking I think
But the other file-based components (like Video or Audio) cannot support multiple files. It's cleaner to have two separate serializers imo. We can refactor FileSerializer to support multiple files, and have a separate MediaSerializer that handles single files instead if you prefer that. Also as part of #3663, I use the Serializer to provide docstring information as well for the client.
Describe the bug
If you have a
gr.File(file_count="multiple")
as output, you won't be able to cache examples since the FileSerializable can't handle multiple files.Is there an existing issue for this?
Reproduction
Screenshot
No response
Logs
System Info
Latest but happens in other versions, e.g. 3.19
Severity
serious, but I can work around it
The text was updated successfully, but these errors were encountered: