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
33.78k stars 2.56k forks source link

Allow event listeners to redirect to another page #7838

Open AusafMo opened 7 months ago

AusafMo commented 7 months ago

Problem
I made an demo, which basically queries some db, and then shows the results in form of images in gallery. However, I am quite surprised (if i understood correctly) that the gallery output doesn't support making the images hyperlink with custom(or any) url(s), and thats true for captions. Also I can not even select the caption text too for some reason.

Possible Solution
It would be awesome if we could make the images hyperlinks the way <a> anchor tag does plain html, there's three possible ways for this i think,

Thanks for the work and this awesome tool.

abidlabs commented 4 months ago

Thanks @AusafMo. I think the general solution we'd want to do is to allow event listeners to return an argument that redirects the Gradio application to a separate page. Its not something we support at the moment, but we could as we're starting to look into having multi-page Gradio apps