Spaces:
Sleeping
Sleeping
app.py
Browse files
app.py
CHANGED
|
@@ -104,63 +104,41 @@ def create_comparison_html(original_list, cleaned_list):
|
|
| 104 |
创建HTML表格展示对比 - 样式匹配Leaderboard表格
|
| 105 |
"""
|
| 106 |
html = """
|
| 107 |
-
<div style="max-width: 100%; overflow-x: auto;">
|
| 108 |
<style>
|
| 109 |
.comparison-table {
|
| 110 |
width: 100%;
|
| 111 |
border-collapse: collapse;
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
background-color: white;
|
| 115 |
-
border: 1px solid #e5e7eb;
|
| 116 |
-
border-radius: 8px;
|
| 117 |
-
overflow: hidden;
|
| 118 |
-
}
|
| 119 |
-
.comparison-table thead {
|
| 120 |
-
background-color: #f9fafb;
|
| 121 |
-
border-bottom: 1px solid #e5e7eb;
|
| 122 |
}
|
| 123 |
.comparison-table th {
|
| 124 |
-
|
|
|
|
|
|
|
| 125 |
text-align: left;
|
| 126 |
-
font-weight:
|
| 127 |
-
|
| 128 |
-
font-size: 13px;
|
| 129 |
-
text-transform: uppercase;
|
| 130 |
-
letter-spacing: 0.05em;
|
| 131 |
}
|
| 132 |
.comparison-table td {
|
| 133 |
-
padding:
|
| 134 |
-
border-bottom: 1px solid #
|
| 135 |
-
line-height: 1.
|
| 136 |
-
color: #1f2937;
|
| 137 |
vertical-align: top;
|
| 138 |
}
|
| 139 |
-
.comparison-table tbody tr:last-child td {
|
| 140 |
-
border-bottom: none;
|
| 141 |
-
}
|
| 142 |
-
.comparison-table tbody tr:hover {
|
| 143 |
-
background-color: #f9fafb;
|
| 144 |
-
}
|
| 145 |
.index-col {
|
| 146 |
-
width:
|
| 147 |
text-align: center;
|
| 148 |
-
font-weight:
|
| 149 |
-
color: #
|
| 150 |
-
}
|
| 151 |
-
.comparison-table .original-col {
|
| 152 |
-
width: 45%;
|
| 153 |
-
}
|
| 154 |
-
.comparison-table .cleaned-col {
|
| 155 |
-
width: 45%;
|
| 156 |
}
|
| 157 |
</style>
|
| 158 |
<table class="comparison-table">
|
| 159 |
<thead>
|
| 160 |
<tr>
|
| 161 |
<th class="index-col">#</th>
|
| 162 |
-
<th
|
| 163 |
-
<th
|
| 164 |
</tr>
|
| 165 |
</thead>
|
| 166 |
<tbody>
|
|
|
|
| 104 |
创建HTML表格展示对比 - 样式匹配Leaderboard表格
|
| 105 |
"""
|
| 106 |
html = """
|
| 107 |
+
<div style="font-family: 'Times New Roman', serif; max-width: 100%; overflow-x: auto;">
|
| 108 |
<style>
|
| 109 |
.comparison-table {
|
| 110 |
width: 100%;
|
| 111 |
border-collapse: collapse;
|
| 112 |
+
margin: 20px 0;
|
| 113 |
+
border: 1px solid #000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
}
|
| 115 |
.comparison-table th {
|
| 116 |
+
background-color: #f2f2f2;
|
| 117 |
+
color: #000;
|
| 118 |
+
padding: 8px;
|
| 119 |
text-align: left;
|
| 120 |
+
font-weight: bold;
|
| 121 |
+
border-bottom: 2px solid #000;
|
|
|
|
|
|
|
|
|
|
| 122 |
}
|
| 123 |
.comparison-table td {
|
| 124 |
+
padding: 8px;
|
| 125 |
+
border-bottom: 1px solid #ccc;
|
| 126 |
+
line-height: 1.5;
|
|
|
|
| 127 |
vertical-align: top;
|
| 128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
.index-col {
|
| 130 |
+
width: 50px;
|
| 131 |
text-align: center;
|
| 132 |
+
font-weight: bold;
|
| 133 |
+
color: #555;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
}
|
| 135 |
</style>
|
| 136 |
<table class="comparison-table">
|
| 137 |
<thead>
|
| 138 |
<tr>
|
| 139 |
<th class="index-col">#</th>
|
| 140 |
+
<th>原始问题 (红色=错误)</th>
|
| 141 |
+
<th>清洗后问题 (绿色=修正)</th>
|
| 142 |
</tr>
|
| 143 |
</thead>
|
| 144 |
<tbody>
|