failure.html
2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>检测到不良言论!</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
text-align: center;
width: 600px;
background-color: #fff;
padding: 50px;
border-radius: 15px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 28px; /* 与 main 的标题一致 */
margin-bottom: 20px;
}
.status-box {
margin-top: 20px;
padding: 20px;
font-size: 18px; /* 与 main 的字体大小一致 */
background-color: #ffebee;
color: #c62828;
border-radius: 10px;
border: 1px solid #c62828;
}
.stats-table {
margin-top: 30px;
width: 100%;
border-collapse: collapse;
}
.stats-table th, .stats-table td {
border: 1px solid #ddd;
padding: 12px;
}
.stats-table th {
background-color: #f2f2f2;
}
a {
display: inline-block;
margin-top: 30px;
padding: 15px 40px;
font-size: 18px;
background-color: #000;
color: white;
text-decoration: none;
border-radius: 30px;
font-weight: bold;
transition: background-color 0.3s ease;
}
a:hover {
background-color: #333;
}
</style>
</head>
<body>
<div class="container">
<h1>数据分析完毕!</h1>
<div class="status-box">
检测到不良言论!
</div>
{% if stats %}
<h3>统计信息:</h3>
<table class="stats-table">
<thead>
<tr>
<th>标签</th>
<th>个数</th>
<th>占比</th>
</tr>
</thead>
<tbody>
{% for label, info in stats.items() %}
<tr>
<td>{{ label }}</td>
<td>{{ info.count }}</td>
<td>{{ info.percentage }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>没有统计信息可显示。</p>
{% endif %}
<a href="/">返回首页</a>
</div>
</body>
</html>