gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
30.34k stars 2.26k forks source link

Be able to generate random samples in `gr.Examples` or `examples` in `gr.ChatInterface` #8325

Open djstrong opened 1 month ago

djstrong commented 1 month ago

Is your feature request related to a problem? Please describe.
I am using ChatInterface (https://huggingface.co/spaces/speakleash/Bielik-7B-Instruct-v0.1-test/blob/main/app.py) and want to sample examples with every page load.

Describe the solution you'd like
Maybe add sample_examples parameter to the ChatInterface?

Additional context
I tried load listener but without success. Related issues: https://github.com/gradio-app/gradio/issues/5042 https://github.com/gradio-app/gradio/issues/8293

abidlabs commented 4 weeks ago

Hi @djstrong if I understand correctly, you want to change the examples randomly every time the page loads?

djstrong commented 4 weeks ago

Yes.