How to use launch(share=True)
Closed this issue ยท 1 comments
Instructions To Reproduce the ๐ Bug:
When I run this project in a server, I want to use the frontend in my own machine's browser. I run the code lighting run app app,py
, then open the link in my machine's browser, I get the error, 121.0.0.1 refused the response. Could you have a way to handle this issue. I make sure that service can be used in the server's own browser.
@dongxiaolong
When running Gradio apps in Lightning, the app generates two pages: the Lightning AI page and the Gradio page. Eventually, the Gradio page is shown on the Lightning AI page.
There might be 2 reasons why you are having trouble opening the UI.
- Model loading takes time. The first run needs to cache the model. The Lightning UI loads fast but the Gradio takes much more, that's why you see refused response. Try waiting a bit more and refreshing the page.
- Your server, if not local, might not have the Gradio port open. You might want to set a static port here
Line 54 in 5bfbfad
From what I know, if you wanna share apps you can use lightning run app app.py --cloud
but I haven't tested it yet. I don't see a launch=True option in the ServeGradio class...