gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Customize the examples in ChatInterface

Open yvrjsharma opened this issue 9 months ago • 0 comments

  • [x] I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
It seems that customizing examples in gr.ChatInterface is not possible, unlike the chatbot and textbox. If I try to pass my own gr.Examples to customize the parameter, I get the below-mentioned error:

ValueError: The parameter examples must either be a string directory or a list(if there is only 1 input component) or (more generally), a nested list, where each sublist represents a set of inputs.

I am trying to customize the examples in ChatInterface so that the number of examples per page is set to a lower value. Examples are shown below the app so a fewer examples would mean more screen space for a chatbot window.

Describe the solution you'd like
The solution could be to either allow this customization of examples in ChatInterface similar to textbox and chatbot or to add a parameter examples_per_page to the ChatInterface component. This would greatly enhance the flexibility and usability of the component.

Additional context
Idefics demo could serve as an example here:

image

yvrjsharma avatar May 07 '24 11:05 yvrjsharma