shorter url for private endpoint

This commit is contained in:
aliabd 2021-04-26 05:21:40 +04:00
parent 677fc48a61
commit 5d1b82c8d3

View File

@ -445,7 +445,7 @@ def url_request(url):
def setup_tunnel(local_server_port, endpoint):
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:
try:
payload = json.loads(response.read().decode("utf-8"))[0]