mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
shorter url for private endpoint
This commit is contained in:
parent
677fc48a61
commit
5d1b82c8d3
@ -445,7 +445,7 @@ def url_request(url):
|
|||||||
|
|
||||||
def setup_tunnel(local_server_port, endpoint):
|
def setup_tunnel(local_server_port, endpoint):
|
||||||
response = url_request(
|
response = url_request(
|
||||||
endpoint if endpoint is not None else GRADIO_API_SERVER)
|
endpoint + '/v1/tunnel-request' if endpoint is not None else GRADIO_API_SERVER)
|
||||||
if response and response.code == 200:
|
if response and response.code == 200:
|
||||||
try:
|
try:
|
||||||
payload = json.loads(response.read().decode("utf-8"))[0]
|
payload = json.loads(response.read().decode("utf-8"))[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user