Spaces:
Runtime error
Runtime error
Create templates/report.html
Browse files- templates/report.html +63 -0
templates/report.html
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="ja">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<title>{{ company }} 与信・投資XAIレポート</title>
|
| 6 |
+
<style>
|
| 7 |
+
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif;margin:24px;line-height:1.6;}
|
| 8 |
+
.card{border:1px solid #ddd;border-radius:12px;padding:16px;margin:12px 0;}
|
| 9 |
+
.bar{height:12px;background:#eee;border-radius:6px;overflow:hidden}
|
| 10 |
+
.bar>div{height:12px;background:#4a90e2}
|
| 11 |
+
.kv{display:flex;gap:16px;flex-wrap:wrap}
|
| 12 |
+
.kv .item{background:#f8f8f8;border-radius:8px;padding:8px 12px}
|
| 13 |
+
ul{margin:8px 0 0 18px}
|
| 14 |
+
.small{color:#666;font-size:12px}
|
| 15 |
+
</style>
|
| 16 |
+
</head>
|
| 17 |
+
<body>
|
| 18 |
+
<h1>{{ company }} 与信・投資XAIレポート</h1>
|
| 19 |
+
|
| 20 |
+
<div class="card">
|
| 21 |
+
<h2>総合スコア: {{ final_score|round(1) }}/100</h2>
|
| 22 |
+
<div class="bar"><div style="width: {{ final_score }}%"></div></div>
|
| 23 |
+
<div class="kv">
|
| 24 |
+
<div class="item">モデル: {{ model_score|round(1) }}</div>
|
| 25 |
+
<div class="item">外部: {{ external.external_total|round(1) }}</div>
|
| 26 |
+
<div class="item">AI: {{ ai.ai_total|round(1) }}</div>
|
| 27 |
+
<div class="item small">AUC(OoF): {{ auc }}</div>
|
| 28 |
+
<div class="item small">PD: {{ prob_default|round(4) }}</div>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
<div class="card">
|
| 33 |
+
<h3>主要要因(SHAP上位)</h3>
|
| 34 |
+
<ul>
|
| 35 |
+
{% for k,v in top_features %}
|
| 36 |
+
<li>{{ k }}: {{ v }}</li>
|
| 37 |
+
{% endfor %}
|
| 38 |
+
</ul>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div class="card">
|
| 42 |
+
<h3>外部スコア 明細(上位)</h3>
|
| 43 |
+
<ul>
|
| 44 |
+
{% for it in external.items[:6] %}
|
| 45 |
+
<li>[{{ it.category }}] {{ it.name }}: raw={{ it.raw }} / w={{ it.weight }} → {{ it.score }} ({{ it.reason }})</li>
|
| 46 |
+
{% endfor %}
|
| 47 |
+
</ul>
|
| 48 |
+
<p class="small">{{ external.notes }}</p>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<div class="card">
|
| 52 |
+
<h3>AI評点(カテゴリ)</h3>
|
| 53 |
+
<ul>
|
| 54 |
+
{% for k,v in ai.category_scores.items() %}
|
| 55 |
+
<li>{{ k }}: {{ v }}</li>
|
| 56 |
+
{% endfor %}
|
| 57 |
+
</ul>
|
| 58 |
+
<p class="small">{{ ai.notes }}</p>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
+
<p class="small">*本レポートはデモ目的の参考結果です。投融資判断は最終的に貴社の方針に従ってください。</p>
|
| 62 |
+
</body>
|
| 63 |
+
</html>
|