Spaces:
No application file
No application file
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>MTEB Leaderboard - Loading</title> | |
<!-- Semi Design CSS --> | |
<link rel="stylesheet" href="https://unpkg.com/@douyinfe/semi-ui/dist/css/semi.min.css"> | |
<!-- Custom CSS --> | |
<link rel="stylesheet" href="{{ url_for('static', path='css/style.css') }}"> | |
<style> | |
.loading-container { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: center; | |
min-height: 100vh; | |
text-align: center; | |
padding: 20px; | |
} | |
.loading-spinner { | |
border: 4px solid #f3f3f3; | |
border-top: 4px solid #3498db; | |
border-radius: 50%; | |
width: 50px; | |
height: 50px; | |
animation: spin 1s linear infinite; | |
margin: 20px 0; | |
} | |
@keyframes spin { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } | |
} | |
.loading-text { | |
font-size: 1.2em; | |
margin: 10px 0; | |
} | |
#loading-status { | |
color: #666; | |
margin-top: 10px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="loading-container"> | |
<h1>MTEB Leaderboard</h1> | |
<div class="loading-spinner"></div> | |
<p class="loading-text">Loading data...</p> | |
<p id="loading-status">Please wait while we initialize the service</p> | |
</div> | |
<script> | |
async function checkStatus() { | |
try { | |
const response = await fetch('/health'); | |
const data = await response.json(); | |
if (data.initialized) { | |
window.location.reload(); | |
} else { | |
const status = document.getElementById('loading-status'); | |
if (data.status === 'initializing') { | |
status.textContent = `Initializing... (${Math.round(data.elapsed_time)}s)`; | |
} else { | |
status.textContent = 'Waiting for initialization...'; | |
} | |
} | |
} catch (error) { | |
console.error('Error checking status:', error); | |
} | |
} | |
// Check status every 2 seconds | |
setInterval(checkStatus, 2000); | |
</script> | |
</body> | |
</html> | |