Spaces:
Paused
Paused
Upload 3 files
Browse files- app.py +1 -1
- templates/dashboard.html +1 -1
app.py
CHANGED
|
@@ -1203,7 +1203,7 @@ def update_model_stats(model, prompt_tokens, completion_tokens, calculation_meth
|
|
| 1203 |
"prompt_tokens": prompt_tokens,
|
| 1204 |
"completion_tokens": completion_tokens,
|
| 1205 |
"calculation_method": calculation_method, # 直接使用传入的值
|
| 1206 |
-
"compute_points": compute_points
|
| 1207 |
}
|
| 1208 |
model_usage_records.append(record)
|
| 1209 |
|
|
|
|
| 1203 |
"prompt_tokens": prompt_tokens,
|
| 1204 |
"completion_tokens": completion_tokens,
|
| 1205 |
"calculation_method": calculation_method, # 直接使用传入的值
|
| 1206 |
+
"compute_points": compute_points if compute_points is not None else None # 确保未获取到时为null
|
| 1207 |
}
|
| 1208 |
model_usage_records.append(record)
|
| 1209 |
|
templates/dashboard.html
CHANGED
|
@@ -855,7 +855,7 @@
|
|
| 855 |
{% for entry in compute_points_log.log %}
|
| 856 |
<tr>
|
| 857 |
{% for key, value in compute_points_log.columns.items() %}
|
| 858 |
-
<td class="compute-points">{{ entry.get(key
|
| 859 |
{% endfor %}
|
| 860 |
</tr>
|
| 861 |
{% endfor %}
|
|
|
|
| 855 |
{% for entry in compute_points_log.log %}
|
| 856 |
<tr>
|
| 857 |
{% for key, value in compute_points_log.columns.items() %}
|
| 858 |
+
<td class="compute-points">{{ entry.get(key) if entry.get(key) is not none else 'null' }}</td>
|
| 859 |
{% endfor %}
|
| 860 |
</tr>
|
| 861 |
{% endfor %}
|