.1f for predict regression
Browse files
app.py
CHANGED
|
@@ -447,7 +447,7 @@ def run_inference(
|
|
| 447 |
output = infer_image(image, head, image_state.get("mask"), return_probs=head not in REGRESSION_HEADS)
|
| 448 |
|
| 449 |
if head in REGRESSION_HEADS:
|
| 450 |
-
return f"{output:.
|
| 451 |
|
| 452 |
# Use id_to_labels.json mapping, fall back to model config if not available
|
| 453 |
id2label = load_id_to_labels().get(head, {})
|
|
|
|
| 447 |
output = infer_image(image, head, image_state.get("mask"), return_probs=head not in REGRESSION_HEADS)
|
| 448 |
|
| 449 |
if head in REGRESSION_HEADS:
|
| 450 |
+
return f"{output:.1f}", gr.update(visible=False)
|
| 451 |
|
| 452 |
# Use id_to_labels.json mapping, fall back to model config if not available
|
| 453 |
id2label = load_id_to_labels().get(head, {})
|