JacobLinCool commited on
Commit
ee630d5
·
verified ·
1 Parent(s): 50928b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -10
app.py CHANGED
@@ -307,7 +307,10 @@ def _discover_checkpoints() -> list[str]:
307
  paths.append(p)
308
  # Also accept HF / user-provided paths via manual input
309
  if not paths:
310
- return ["JacobLinCool/TaikoChartEstimator-20251228"]
 
 
 
311
  return sorted(paths)
312
 
313
 
@@ -1205,15 +1208,21 @@ def run_inference(
1205
  "max_tokens_per_instance": int(max_tokens),
1206
  "window_measures": window_measures,
1207
  "hop_measures": int(hop_measures),
1208
- "attention_entropy": float(attn.get("entropy")[0].item())
1209
- if attn.get("entropy") is not None
1210
- else None,
1211
- "attention_effective_n": float(attn.get("effective_n")[0].item())
1212
- if attn.get("effective_n") is not None
1213
- else None,
1214
- "attention_top5_mass": float(attn.get("top5_mass")[0].item())
1215
- if attn.get("top5_mass") is not None
1216
- else None,
 
 
 
 
 
 
1217
  }
1218
 
1219
  summary_md = (
 
307
  paths.append(p)
308
  # Also accept HF / user-provided paths via manual input
309
  if not paths:
310
+ return [
311
+ "JacobLinCool/TaikoChartEstimator-20251228",
312
+ "JacobLinCool/TaikoChartEstimator-20251229",
313
+ ]
314
  return sorted(paths)
315
 
316
 
 
1208
  "max_tokens_per_instance": int(max_tokens),
1209
  "window_measures": window_measures,
1210
  "hop_measures": int(hop_measures),
1211
+ "attention_entropy": (
1212
+ float(attn.get("entropy")[0].item())
1213
+ if attn.get("entropy") is not None
1214
+ else None
1215
+ ),
1216
+ "attention_effective_n": (
1217
+ float(attn.get("effective_n")[0].item())
1218
+ if attn.get("effective_n") is not None
1219
+ else None
1220
+ ),
1221
+ "attention_top5_mass": (
1222
+ float(attn.get("top5_mass")[0].item())
1223
+ if attn.get("top5_mass") is not None
1224
+ else None
1225
+ ),
1226
  }
1227
 
1228
  summary_md = (