Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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
|
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)
|