Using Gradio on JupyterHub

Has anyone successfully used Gradio on a JupyterHub?

Currently, running launch does not ever load the interface (and navigating to the IP address obviously does not work). Additionally, setting share=True raises an error).

I only need Gradio to work inline in notebooks, and it seems like there’s probably some server setting that will allow this. Has anyone been able to, or have a workaround?

+1 looking for a solution to this.

I was able to get it to work with share=True. One problem was that opening certain ports requires root access, and users on the JupyterHub aren’t sudo. However, you can manually change the permissions on the executable that Gradio uses to launch a tunnel to allow any user to execute. That should let you launch apps with share=True, although with lots of users you may run out of ports.

1 Like

Setting share=True should work in this situation!