added --listen option to make gradio listen on network requests

This commit is contained in:
AUTOMATIC
2022-09-05 19:37:11 +03:00
parent 5bb69bd915
commit 064965c466
3 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ mimetypes.init()
mimetypes.add_type('application/javascript', '.js')
if not cmd_opts.share:
if not cmd_opts.share and not cmd_opts.listen:
# fix gradio phoning home
gradio.utils.version_check = lambda: None
gradio.utils.get_local_ip_address = lambda: '127.0.0.1'