Two input type(filepath and text)

I created simple gradio demo.

I 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?

Hi @yusyel this is definitely doable. The inputs parameter in gradio can 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 be None, so you should write the logic in your function accordingly)

Hi @abidlabs Thanks for anwser.

Adding *args solved problem for two arguments. And gr.inputs.Image(type="filepath") works. But gr.inputs.Textbox not working. How can determinant two inputs in my function?

edit: Iā€™m getting path 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))