model training WIP

This commit is contained in:
Dobromir Popov
2025-10-25 00:17:53 +03:00
parent c28ee2c432
commit e816cb9795
4 changed files with 516 additions and 49 deletions

View File

@@ -154,12 +154,15 @@
.catch(error => {
console.error('Error loading models:', error);
const modelSelect = document.getElementById('model-select');
modelSelect.innerHTML = '<option value="">Error loading models</option>';
// Stop polling on error
if (modelLoadingPollInterval) {
clearInterval(modelLoadingPollInterval);
modelLoadingPollInterval = null;
// Don't stop polling on network errors - keep trying
if (!modelLoadingPollInterval) {
modelSelect.innerHTML = '<option value="">⚠️ Connection error, retrying...</option>';
// Start polling to retry
modelLoadingPollInterval = setInterval(loadAvailableModels, 3000); // Poll every 3 seconds
} else {
// Already polling, just update the message
modelSelect.innerHTML = '<option value="">🔄 Retrying...</option>';
}
});
}