Skip to content

Commit

Permalink
Make gradio local url work for docker users (modelscope#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
loveritsu929re authored Mar 22, 2024
1 parent ab056d5 commit 7f104b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,4 +1588,7 @@ def inference_tryon():

if __name__ == "__main__":
set_spawn_method()
demo.queue(status_update_rate=1).launch(share=True)
if os.path.exists("/.dockerenv"):
demo.queue(status_update_rate=1).launch(server_name="0.0.0.0", share=True)
else:
demo.queue(status_update_rate=1).launch(share=True)

0 comments on commit 7f104b3

Please sign in to comment.