Spaces:
Running
on
Zero
Running
on
Zero
Remove score output; heatmap + status only
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ def infer(ref_files, test_file, use_sam3, sam_prompt):
|
|
| 96 |
overlay = _make_overlay(image, amap)
|
| 97 |
|
| 98 |
status_text = "\n".join(status_lines) if status_lines else f"Ran on {device}."
|
| 99 |
-
return overlay,
|
| 100 |
|
| 101 |
|
| 102 |
def build_demo():
|
|
@@ -121,13 +121,12 @@ def build_demo():
|
|
| 121 |
|
| 122 |
run_btn = gr.Button("Run", variant="primary")
|
| 123 |
overlay_out = gr.Image(label="Heatmap overlay", type="pil")
|
| 124 |
-
score_out = gr.Number(label="Image anomaly score (mean top 1% distance)")
|
| 125 |
status_out = gr.Markdown(label="Status / tips")
|
| 126 |
|
| 127 |
run_btn.click(
|
| 128 |
infer,
|
| 129 |
inputs=[ref_in, test_in, use_sam, sam_prompt],
|
| 130 |
-
outputs=[overlay_out,
|
| 131 |
)
|
| 132 |
|
| 133 |
return demo
|
|
|
|
| 96 |
overlay = _make_overlay(image, amap)
|
| 97 |
|
| 98 |
status_text = "\n".join(status_lines) if status_lines else f"Ran on {device}."
|
| 99 |
+
return overlay, status_text
|
| 100 |
|
| 101 |
|
| 102 |
def build_demo():
|
|
|
|
| 121 |
|
| 122 |
run_btn = gr.Button("Run", variant="primary")
|
| 123 |
overlay_out = gr.Image(label="Heatmap overlay", type="pil")
|
|
|
|
| 124 |
status_out = gr.Markdown(label="Status / tips")
|
| 125 |
|
| 126 |
run_btn.click(
|
| 127 |
infer,
|
| 128 |
inputs=[ref_in, test_in, use_sam, sam_prompt],
|
| 129 |
+
outputs=[overlay_out, status_out],
|
| 130 |
)
|
| 131 |
|
| 132 |
return demo
|