updates
Browse files- app.py +4 -0
- results/heatmaps_log.jsonl +0 -0
app.py
CHANGED
|
@@ -576,6 +576,10 @@ async def attention_heatmap(file: UploadFile = File(...)):
|
|
| 576 |
most_similar_id = same_label[max_idx]["source"]
|
| 577 |
most_similar_score = float(sim_scores[max_idx])
|
| 578 |
most_similar_img = same_label[max_idx].get("image_base64")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 579 |
|
| 580 |
# === Step 10. 儲存新紀錄並上傳 ===
|
| 581 |
new_record = {
|
|
|
|
| 576 |
most_similar_id = same_label[max_idx]["source"]
|
| 577 |
most_similar_score = float(sim_scores[max_idx])
|
| 578 |
most_similar_img = same_label[max_idx].get("image_base64")
|
| 579 |
+
print(f"[heatmap-match] 🔍 Found {most_similar_id} in label '{same_label}'")
|
| 580 |
+
print(f"[heatmap-match] ✅ Best match: {most_similar_id}, sim={sim_scores:.4f}")
|
| 581 |
+
else:
|
| 582 |
+
print(f"[heatmap-match] ⚠️ No other heatmaps found under label '{same_label}'")
|
| 583 |
|
| 584 |
# === Step 10. 儲存新紀錄並上傳 ===
|
| 585 |
new_record = {
|
results/heatmaps_log.jsonl
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|