inoki-giskard commited on
Commit
bdb6803
1 Parent(s): 18f1fae

Do not set default port for external ML worker

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -10,11 +10,9 @@ def run_ml_worker(url, api_key, hf_token):
10
  parsed_url = urlparse(url)
11
  backend_url = AnyHttpUrl(
12
  url=f"{parsed_url.scheme if parsed_url.scheme else 'http'}://{parsed_url.hostname}"
13
- f":{parsed_url.port if parsed_url.port else settings.ws_port}"
14
  f"/{parsed_url.path if parsed_url.path and len(parsed_url.path) else settings.ws_path}",
15
  scheme=parsed_url.scheme,
16
  host=parsed_url.hostname,
17
- port=parsed_url.port if parsed_url.port else settings.ws_port,
18
  path=parsed_url.path if parsed_url.path and len(parsed_url.path) else settings.ws_path,
19
  )
20
  print(f"Starting ML worker for {backend_url}")
 
10
  parsed_url = urlparse(url)
11
  backend_url = AnyHttpUrl(
12
  url=f"{parsed_url.scheme if parsed_url.scheme else 'http'}://{parsed_url.hostname}"
 
13
  f"/{parsed_url.path if parsed_url.path and len(parsed_url.path) else settings.ws_path}",
14
  scheme=parsed_url.scheme,
15
  host=parsed_url.hostname,
 
16
  path=parsed_url.path if parsed_url.path and len(parsed_url.path) else settings.ws_path,
17
  )
18
  print(f"Starting ML worker for {backend_url}")