Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -384,16 +384,20 @@ async def home():
|
|
| 384 |
for url, data in model_warmup_results.items():
|
| 385 |
model_info = data['model_info']
|
| 386 |
health = data['health_check']
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
model_statuses.append({
|
| 388 |
'name': model_info['name'],
|
| 389 |
'type': model_info.get('type', 'health_check'),
|
| 390 |
-
'
|
| 391 |
'response_time': health.get('response_time_ms', 0),
|
| 392 |
-
'
|
| 393 |
})
|
| 394 |
|
| 395 |
model_status_html = "".join([
|
| 396 |
-
f"<li>{m['name']} ({m['type']}): <span class={
|
| 397 |
for m in model_statuses
|
| 398 |
])
|
| 399 |
|
|
|
|
| 384 |
for url, data in model_warmup_results.items():
|
| 385 |
model_info = data['model_info']
|
| 386 |
health = data['health_check']
|
| 387 |
+
|
| 388 |
+
status_display = "success" if health['status'] == 'success' else "error"
|
| 389 |
+
error_display = f" - {health['error']}" if health.get('error') else ""
|
| 390 |
+
|
| 391 |
model_statuses.append({
|
| 392 |
'name': model_info['name'],
|
| 393 |
'type': model_info.get('type', 'health_check'),
|
| 394 |
+
'status_display': status_display,
|
| 395 |
'response_time': health.get('response_time_ms', 0),
|
| 396 |
+
'error_display': error_display
|
| 397 |
})
|
| 398 |
|
| 399 |
model_status_html = "".join([
|
| 400 |
+
f"<li>{m['name']} ({m['type']}): <span class='{m['status_display']}'>{m['status_display']}</span> ({m['response_time']}ms){m['error_display']}</li>"
|
| 401 |
for m in model_statuses
|
| 402 |
])
|
| 403 |
|