Two input type(filepath and text)
I created simple gradio demo.huggingface.coFish - a Hugging Face Space by yusyelDiscover amazing ML apps made by the communityI want to add textbox which is for image url.I tried adding another inputs but I’m getting error.Is there any way to achieve this?
2023-07-30T04:41:31Z
Hi@yusyelthis is definitely doable. Theinputsparameter ingradiocan take in a list of inputs, so you can add a textbox which is an image URL. Both inputs will get passed into your function, so your function should now take in two arguments (either of which can beNone, so you should write the logic in your function accordingly)
2023-07-30T11:56:13Z
Hi@abidlabsThanks for anwser.Adding *args solved problem for two arguments. Andgr.inputs.Image(type="filepath")works. But gr.inputs.Textbox not working. How can determinant two inputs  in my function?edit: I’m gettingpath should be path-like or io.BytesIO, not <class 'NoneType'>error. I did try turning input to BytesIo manualy in my function. But did not worked.this line cause error:img = load_img(img, target_size=(249, 249, 3))