lyi029 commited on
Commit
32d1c5e
·
1 Parent(s): f342221
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -512,10 +512,10 @@ async def attention_heatmap(file: UploadFile = File(...)):
512
 
513
  # === 回傳 JSON ===
514
  return {
515
- "num_blocks": len(results),
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
 
 
512
 
513
  # === 回傳 JSON ===
514
  return {
515
+ # "num_blocks": len(results),
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