# Gradio Button's function only takes in Gradio component as input?

**URL:** <https://discuss.huggingface.co/t/gradio-buttons-function-only-takes-in-gradio-component-as-input/53119>\
**Category:** 🔒 Gradio\
**Created:** [September 1, 2023, 11:12am UTC](https://discuss.huggingface.co/t/gradio-buttons-function-only-takes-in-gradio-component-as-input/53119 "2023-09-01T11:12:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taekyo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/taekyo/32/19092_2.png) [@taekyo](https://discuss.huggingface.co/u/taekyo)\
**Post date:** [September 1, 2023, 11:12am UTC](https://discuss.huggingface.co/t/gradio-buttons-function-only-takes-in-gradio-component-as-input/53119/1 "2023-09-01T11:12:02Z")

</div>

When using ‘Button.click(fn, **inputs** )’, Gradio’s document says **inputs** should be gradio.components or list of gradio.components.  
But sometimes it is crucial to pass in an object which is not an gradio.component. For example, the invoked function takes in my custom class object.  
Is there any way to input an object that is NOT gradio.component?

---

<div class="post-metadata">

**Author:** ![wudan](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wudan](https://discuss.huggingface.co/u/wudan)\
**Post date:** [September 12, 2023, 9:10am UTC](https://discuss.huggingface.co/t/gradio-buttons-function-only-takes-in-gradio-component-as-input/53119/2 "2023-09-12T09:10:20Z")

</div>

hi, have you solved this problem yet?
