Strange issue related to gr.File() component
I am using gradio version 3.11.0I have an input component where I am expecting a PDF file. I have specified type=‘binary’. Code is below.input_pdf = gr.File(type="binary", label="Input Invoice PDF file")I am getting below runtime error with type=‘binary’ValueError: Unknown type: binary. Please choose from: ‘file’, ‘bytes’.I changed the type to ‘bytes’ thinking ‘binary’ might be a wrong keyword. But this time I got error at the code line itself, it complained to use ‘bytes’ and suprisingly error says to choose from [‘file’, ‘binary’]. You can see below:image1391×879 50.7 KBNOTE: I am running this in google colab with python version 3.10.11I am stuck please help. I have tried upgrading to the latest releases but it’s raising a different error related to ‘toorjson’ not found in some other lib in gradio.
2023-05-11T20:42:16Z
hi@shubh1608.Could you please upgrade your Gradio to3.30.0and use Filetype="binary"?Thanks
2023-05-13T07:51:35Z
Hey@radames, I will try upgrading the gradio. Thanks for the reply.