gradio
6c73e79c - Fixed a type bug where the validation was "binary" (#2727)

Commit
3 years ago
Fixed a type bug where the validation was "binary" (#2727) * Fixed a type bug where the validation was "binary" In line 2113 the type was validated as either file or binary: ```python valid_types = ["file", "binary"] if type not in valid_types: raise ValueError( f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}" ) ``` However line 2183 preprocess single file wanted either "file" or "bytes" ```python elif self.type == "bytes": ``` I have arbitrarily picked binary as the one to match, but now they are both consistent. * added test, changelog, formatting Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Author
Parents
Loading