Spaces:
Paused
Paused
Upload app.py
Browse files
app.py
CHANGED
|
@@ -520,10 +520,10 @@ async def handle_upright_challenge(data: dict) -> dict:
|
|
| 520 |
# Debug: Log image dimensions
|
| 521 |
logger.info(f"🔍 UPRIGHT DEBUG: Original image dimensions: {original_w}x{original_h}")
|
| 522 |
|
| 523 |
-
# Determine input size for this inference (prefer model config, default to
|
| 524 |
input_size = model_data.get('input_size')
|
| 525 |
-
if not isinstance(input_size, int) or input_size <= 0:
|
| 526 |
-
input_size =
|
| 527 |
|
| 528 |
input_tensor = preprocess_image(image_bytes, input_size)
|
| 529 |
outputs = model_data['session'].run(None, {model_data['input_name']: input_tensor})[0]
|
|
|
|
| 520 |
# Debug: Log image dimensions
|
| 521 |
logger.info(f"🔍 UPRIGHT DEBUG: Original image dimensions: {original_w}x{original_h}")
|
| 522 |
|
| 523 |
+
# Determine input size for this inference (prefer model config, default to 300 for upright 3x2 grid)
|
| 524 |
input_size = model_data.get('input_size')
|
| 525 |
+
if not isinstance(input_size) or not isinstance(input_size, int) or input_size <= 0:
|
| 526 |
+
input_size = 300
|
| 527 |
|
| 528 |
input_tensor = preprocess_image(image_bytes, input_size)
|
| 529 |
outputs = model_data['session'].run(None, {model_data['input_name']: input_tensor})[0]
|