Rajhuggingface4253 commited on
Commit
8d3f716
·
verified ·
1 Parent(s): a3f3af9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- 'status': health['status'],
391
  'response_time': health.get('response_time_ms', 0),
392
- 'error': health.get('error', '')
393
  })
394
 
395
  model_status_html = "".join([
396
- f"<li>{m['name']} ({m['type']}): <span class={'success' if m['status'] == 'success' else 'error'}>{m['status']}</span> ({m['response_time']}ms){f' - {m[\"error\"]}' if m['error'] else ''}</li>"
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