# Two input type(filepath and text)

**URL:** <https://discuss.huggingface.co/t/two-input-type-filepath-and-text/48521>\
**Category:** 🔒 Gradio\
**Created:** [July 28, 2023, 1:12pm UTC](https://discuss.huggingface.co/t/two-input-type-filepath-and-text/48521 "2023-07-28T13:12:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yusyel](https://avatars.discourse-cdn.com/v4/letter/y/439d5e/32.png) [@yusyel](https://discuss.huggingface.co/u/yusyel)\
**Post date:** [July 28, 2023, 1:12pm UTC](https://discuss.huggingface.co/t/two-input-type-filepath-and-text/48521/1 "2023-07-28T13:12:19Z")

</div>

I created simple gradio demo.

> **[Fish - a Hugging Face Space by yusyel](https://huggingface.co/spaces/yusyel/fishv2)**
>
> Discover amazing ML apps made by the community

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?

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](https://discuss.huggingface.co/u/abidlabs)\
**Post date:** [July 30, 2023, 4:41am UTC](https://discuss.huggingface.co/t/two-input-type-filepath-and-text/48521/2 "2023-07-30T04:41:31Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![yusyel](https://avatars.discourse-cdn.com/v4/letter/y/439d5e/32.png) [@yusyel](https://discuss.huggingface.co/u/yusyel)\
**Post date:** [July 30, 2023, 11:56am UTC](https://discuss.huggingface.co/t/two-input-type-filepath-and-text/48521/3 "2023-07-30T11:56:13Z")

</div>

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:

```auto
 img = load_img(img, target_size=(249, 249, 3))

```
