mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
added env port
This commit is contained in:
parent
fe3171a934
commit
574e1cb7b4
@ -18,13 +18,12 @@ import sys
|
|||||||
import analytics
|
import analytics
|
||||||
|
|
||||||
|
|
||||||
INITIAL_PORT_VALUE = (
|
INITIAL_PORT_VALUE = os.getenv(
|
||||||
7860
|
'GRADIO_SERVER_PORT', "7860") # The http server will try to open on port 7860. If not available, 7861, 7862, etc.
|
||||||
) # The http server will try to open on port 7860. If not available, 7861, 7862, etc.
|
TRY_NUM_PORTS = os.getenv(
|
||||||
TRY_NUM_PORTS = (
|
'GRADIO_NUM_PORTS', "100") # Number of ports to try before giving up and throwing an exception.
|
||||||
100
|
LOCALHOST_NAME = os.getenv(
|
||||||
) # Number of ports to try before giving up and throwing an exception.
|
'GRADIO_SERVER_NAME', "127.0.0.1")
|
||||||
LOCALHOST_NAME = os.getenv('GRADIO_SERVER_NAME', "127.0.0.1")
|
|
||||||
GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request"
|
GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request"
|
||||||
|
|
||||||
STATIC_TEMPLATE_LIB = pkg_resources.resource_filename("gradio", "templates/")
|
STATIC_TEMPLATE_LIB = pkg_resources.resource_filename("gradio", "templates/")
|
||||||
|
Loading…
Reference in New Issue
Block a user