updates
Browse files
app.py
CHANGED
|
@@ -516,7 +516,7 @@ async def attention_heatmap(file: UploadFile = File(...)):
|
|
| 516 |
# "avg_attention": avg_score,
|
| 517 |
# "blocks": results,
|
| 518 |
# "heatmap_matrix": heatmap_data.tolist(), # ✅ 可互動繪圖
|
| 519 |
-
f"data:image/png;base64,{img_base64}" # ✅ 前端直接顯示
|
| 520 |
}
|
| 521 |
|
| 522 |
except Exception as e:
|
|
|
|
| 516 |
# "avg_attention": avg_score,
|
| 517 |
# "blocks": results,
|
| 518 |
# "heatmap_matrix": heatmap_data.tolist(), # ✅ 可互動繪圖
|
| 519 |
+
"attention_heatmap": f"data:image/png;base64,{img_base64}" # ✅ 前端直接顯示
|
| 520 |
}
|
| 521 |
|
| 522 |
except Exception as e:
|