model training WIP
This commit is contained in:
@@ -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>';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user