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
34k stars 2.58k forks source link

Ensure custom components work with Gradio 5 #9457

Closed abidlabs closed 1 month ago

abidlabs commented 1 month ago

Two things we need to confirm:

freddyaboulton commented 1 month ago

I just verified with my RangeSlider component. It works with 5.0 even though I only modified the styling to match the 5.0 slider style. Checked both SSR and non SSR mode from 5.0.0b4.

image

gradio dev mode on 5.0 is broken though if you have an old version of @gradio/preview (I think this is expected, right @pngwn ?) So I think we can list this is a breaking change. Developers need to update their js dependencies to use gradio cc dev mode.

freddyaboulton commented 1 month ago

The cli experience on 5.0 is still broken though.

abidlabs commented 1 month ago

Checked both SSR and non SSR mode from 5.0.0b4

Nice! How does it work with SSR mode, does it render after the rest of the gradio app has already rendered?

gradio dev mode on 5.0 is broken though if you have an old version of @gradio/preview (I think this is expected, right @pngwn ?) So I think we can list this is a breaking change. Developers need to update their js dependencies to use gradio cc dev mode.

Is it possible to update their js dependencies automatically when they run gradio cc dev so developers don't have to think about this?

freddyaboulton commented 1 month ago

I was mistaken. I tested on the pre-release which had a bug that made SSR not work so things were loading correctly. custom components work in 5.0 in SPA mode. @pngwn and I are fixing SSR mode. But we un-broke the CLI lol

ngaudemet commented 3 weeks ago

Hello @freddyaboulton

Congratulations for the great job on gradio 5!

I use custom components, which work well in gradio 5 without SSR. However, in SSR mode, I have plenty of errors, always the same, in the Chrome or Edge console :

image

Then it doesn't show anything.

It is on gradio==5.3 (but I guess it doesn’t work in SSR on any gradio 5 version)

On one component I also updated the js dependencies but it doesn’t solve anything.

Any clue on how to solve it ?

Thanks a lot!