Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds examples_per_page to gr.ChatInterface and allows clear_btn in gr.Interface to be hidden #8244

Merged
merged 3 commits into from
May 9, 2024

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented May 8, 2024

A few small changes in this PR:

  1. First, adds examples_per_page to gr.ChatInterface, closes: Customize the examples in ChatInterface  #8233. My original plan had been to add support for providing an instance of gr.Examples but this does not really make sense since a user can't provide the correct fn to examples since the example function is redefined internally. We also have the same examples_per_page argument in gr.Interface
  2. I went through the arguments of gr.Interface to make sure that we have equivalent arguments in gr.ChatInterface and made a few other small tweaks, such as allowing clear_btn in gr.Interface to be set to None hiding it, similar to how the buttons in gr.ChatInterface. I believe there was an issue about this that we closed
  3. Adds some docs to gr.ChatInterface guide

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented May 8, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detecting...

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/de1ee9ade13a340113cf73285f636a7e3a91236f/gradio-4.29.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@de1ee9ade13a340113cf73285f636a7e3a91236f#subdirectory=client/python"

@gradio-pr-bot
Copy link
Collaborator

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio minor
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Adds examples_per_page to gr.ChatInterface and allows clear_btn in gr.Interface to be hidden

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs requested a review from yvrjsharma May 9, 2024 00:34
@yvrjsharma
Copy link
Collaborator

This is awesome; thanks for taking care of this feature request, @abidlabs ! 🙌 The examples_per_page argument is now working for me for the ChatInterface component as well 🥳

@abidlabs
Copy link
Member Author

abidlabs commented May 9, 2024

Thanks @yvrjsharma for confirming!

@abidlabs abidlabs merged commit 52dac63 into main May 9, 2024
7 checks passed
@abidlabs abidlabs deleted the examples-chat-interface branch May 9, 2024 15:23
@pngwn pngwn mentioned this pull request May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize the examples in ChatInterface
3 participants