truthdotphd commited on
Commit
02ded84
·
verified ·
1 Parent(s): a982d95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,7 +58,7 @@ HTTP_TRITON_URL = f"{TRITON_IP}:8000"
58
  TRITON_MODEL_NAME = "cloud-detection" # Ensure this matches your deployed model name
59
  TRITON_INPUT_NAME = "input_jp2_bytes" # Ensure this matches your model's config.pbtxt
60
  TRITON_OUTPUT_NAME = "output_mask" # Ensure this matches your model's config.pbtxt
61
- TRITON_TIMEOUT_SECONDS = 300.0 # 5 minutes timeout for connection/network
62
 
63
 
64
  # --- Utility Functions (mostly from paste.txt) ---
@@ -403,7 +403,7 @@ def run_inference_triton_http(input_byte_array):
403
  inputs=inputs,
404
  outputs=outputs,
405
  request_id=str(os.getpid()), # Optional request ID
406
- timeout=TRITON_TIMEOUT_SECONDS + 60.0 # Give extra time for the inference itself
407
  )
408
  print("Triton inference request successful.")
409
  mask = response.as_numpy(TRITON_OUTPUT_NAME)
 
58
  TRITON_MODEL_NAME = "cloud-detection" # Ensure this matches your deployed model name
59
  TRITON_INPUT_NAME = "input_jp2_bytes" # Ensure this matches your model's config.pbtxt
60
  TRITON_OUTPUT_NAME = "output_mask" # Ensure this matches your model's config.pbtxt
61
+ TRITON_TIMEOUT_SECONDS = 300 # 5 minutes timeout for connection/network
62
 
63
 
64
  # --- Utility Functions (mostly from paste.txt) ---
 
403
  inputs=inputs,
404
  outputs=outputs,
405
  request_id=str(os.getpid()), # Optional request ID
406
+ timeout=TRITON_TIMEOUT_SECONDS
407
  )
408
  print("Triton inference request successful.")
409
  mask = response.as_numpy(TRITON_OUTPUT_NAME)