mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
fix launch port issue
This commit is contained in:
parent
1da8db393c
commit
1e4fefdcff
@ -119,7 +119,6 @@ class Interface:
|
|||||||
self.flagging_dir = flagging_dir
|
self.flagging_dir = flagging_dir
|
||||||
Interface.instances.add(self)
|
Interface.instances.add(self)
|
||||||
self.analytics_enabled=analytics_enabled
|
self.analytics_enabled=analytics_enabled
|
||||||
self.launch_port = None
|
|
||||||
self.save_to = None
|
self.save_to = None
|
||||||
self.share = None
|
self.share = None
|
||||||
|
|
||||||
@ -341,6 +340,7 @@ class Interface:
|
|||||||
server_port, app, thread = networking.start_server(
|
server_port, app, thread = networking.start_server(
|
||||||
self, self.server_name, self.server_port)
|
self, self.server_name, self.server_port)
|
||||||
path_to_local_server = "http://{}:{}/".format(self.server_name, server_port)
|
path_to_local_server = "http://{}:{}/".format(self.server_name, server_port)
|
||||||
|
self.server_port = server_port
|
||||||
self.status = "RUNNING"
|
self.status = "RUNNING"
|
||||||
self.server = app
|
self.server = app
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ class Interface:
|
|||||||
print("This share link will expire in 6 hours. If you need a "
|
print("This share link will expire in 6 hours. If you need a "
|
||||||
"permanent link, email support@gradio.app")
|
"permanent link, email support@gradio.app")
|
||||||
try:
|
try:
|
||||||
share_url = networking.setup_tunnel(self.launch_port)
|
share_url = networking.setup_tunnel(server_port)
|
||||||
print("Running on External URL:", share_url)
|
print("Running on External URL:", share_url)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
data = {'error': 'RuntimeError in launch method'}
|
data = {'error': 'RuntimeError in launch method'}
|
||||||
|
@ -119,7 +119,6 @@ class Interface:
|
|||||||
self.flagging_dir = flagging_dir
|
self.flagging_dir = flagging_dir
|
||||||
Interface.instances.add(self)
|
Interface.instances.add(self)
|
||||||
self.analytics_enabled=analytics_enabled
|
self.analytics_enabled=analytics_enabled
|
||||||
self.launch_port = None
|
|
||||||
self.save_to = None
|
self.save_to = None
|
||||||
self.share = None
|
self.share = None
|
||||||
|
|
||||||
@ -341,6 +340,7 @@ class Interface:
|
|||||||
server_port, app, thread = networking.start_server(
|
server_port, app, thread = networking.start_server(
|
||||||
self, self.server_name, self.server_port)
|
self, self.server_name, self.server_port)
|
||||||
path_to_local_server = "http://{}:{}/".format(self.server_name, server_port)
|
path_to_local_server = "http://{}:{}/".format(self.server_name, server_port)
|
||||||
|
self.server_port = server_port
|
||||||
self.status = "RUNNING"
|
self.status = "RUNNING"
|
||||||
self.server = app
|
self.server = app
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ class Interface:
|
|||||||
print("This share link will expire in 6 hours. If you need a "
|
print("This share link will expire in 6 hours. If you need a "
|
||||||
"permanent link, email support@gradio.app")
|
"permanent link, email support@gradio.app")
|
||||||
try:
|
try:
|
||||||
share_url = networking.setup_tunnel(self.launch_port)
|
share_url = networking.setup_tunnel(server_port)
|
||||||
print("Running on External URL:", share_url)
|
print("Running on External URL:", share_url)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
data = {'error': 'RuntimeError in launch method'}
|
data = {'error': 'RuntimeError in launch method'}
|
||||||
|
Loading…
Reference in New Issue
Block a user