diff --git a/src/components/TrainModelFirstTitle.svelte b/src/components/TrainModelFirstTitle.svelte index 1032341a6..519722e1d 100644 --- a/src/components/TrainModelFirstTitle.svelte +++ b/src/components/TrainModelFirstTitle.svelte @@ -27,6 +27,6 @@ navigate(Paths.DATA)}> {$t('content.model.addData')} - + diff --git a/src/pages/DataPage.svelte b/src/pages/DataPage.svelte index 2ec47c5f9..8a94b45d4 100644 --- a/src/pages/DataPage.svelte +++ b/src/pages/DataPage.svelte @@ -123,6 +123,6 @@ - + {/if} diff --git a/src/pages/model/stackview/ModelPageStackView.svelte b/src/pages/model/stackview/ModelPageStackView.svelte index 360a6b0c9..357dd89d7 100644 --- a/src/pages/model/stackview/ModelPageStackView.svelte +++ b/src/pages/model/stackview/ModelPageStackView.svelte @@ -1,6 +1,6 @@ @@ -91,11 +91,7 @@
{#if $state.isPredicting} - {#if $state.isInputReady} - - {:else} - - {/if} + {:else} {/if} diff --git a/src/pages/training/TrainingButton.svelte b/src/pages/training/TrainingButton.svelte index d6ab76d00..2dea19388 100644 --- a/src/pages/training/TrainingButton.svelte +++ b/src/pages/training/TrainingButton.svelte @@ -9,11 +9,11 @@ import StandardButton, { ButtonVariant } from '../../components/StandardButton.svelte'; import { trainModel } from '../../script/ml'; import { t } from '../../i18n'; - import StandardDialog from '../../components/dialogs/StandardDialog.svelte'; import { Paths, navigate } from '../../router/paths'; import { gestures } from '../../script/stores/Stores'; export let type: ButtonVariant = 'primary'; + export let action: 'navigate' | 'train' = 'train'; $: trainButtonLabel = !$state.isPredicting ? 'menu.trainer.trainModelButton' @@ -30,36 +30,19 @@ trainingDialogOpen = false; }; - const startTraining = async (): Promise => { + const startTraining = () => { closeTrainingDialog(); + trainModel(); + }; + + const navitgateToTrainingPage = () => { navigate(Paths.TRAINING); - const shouldRedirect = await trainModel(); - if (shouldRedirect) { - navigate(Paths.MODEL); - } }; { - trainingDialogOpen = true; - }} + onClick={action === 'navigate' ? navitgateToTrainingPage : startTraining} disabled={trainingButtonDisabled} {type} >{$t(trainButtonLabel)} - - -
-

{$t('content.data.trainDialog.title')}

-

{$t('content.data.trainDialog.text')}

-
- {$t('connectMB.backButton')} - {$t('content.data.trainDialog.title')} -
-
-