{{ define "title" }} Model: {{ .Model.Name }} {{ end }} {{ define "base-model-card" }}

{{ .Model.Name }}

Image Type: {{ .Model.Color_mode }}
Image Size: {{ .Model.Width }}x{{ .Model.Height }}
{{ end }} {{ define "delete-model-card" }}
To delete this model please type "{{ .Model.Name }}": {{ if .NameDoesNotMatch }} Name does not match "{{ .Model.Name }}" {{ end }}
{{ end }} {{/* Is called from a diffrent endpoint so that it does not matter where this is from :) which means that . can mean what ever I want */}} {{ define "data-model-create-class-table-table" }}
{{range .List}} {{end}}
File Path Mode
{{.FilePath}} {{ if (eq .Mode 2) }} Testing {{ else }} Training {{ end }} {{ if startsWith .FilePath "file://" }} {{ else }} TODO img {{ .FilePath }} {{ end }}
{{ if gt .Page 0 }} {{ end }}
{{ .Page }}
{{ if lt (mul .Page 10) .Count }} {{ end }}
{{ end }} {{ define "data-model-create-class-table" }} {{ if eq (len .Classes) 0 }} TODO CREATE TABLE {{else}}
{{/* Handle the case where there are to many buttons */}} {{ range .Classes }} {{/* TODO Auto Load 1st */}} {{ end }} {{ range .Classes }}
{{ end }}
{{end}} {{ end }} {{ define "data-model-card" }}

Training data

{{ if eq (len .Classes) 0 }}

You need to upload data so the model can train.

Please provide a file that has the training and testing data
The file must have 2 folders one with testing images and one with training images.
Each of the folders will contain the classes of the model. The folders must be the same in testing and training. The class folders must have the images for the classes.
    training\
        class1\
            img1.png
            img2.png
            img2.png
            ...
        class2\
            img1.png
            img2.png
            img2.png
            ...
        ...
    testing\
        class1\
            img1.png
            img2.png
            img2.png
            ...
        class2\
            img1.png
            img2.png
            img2.png
            ...
        ...
{{ template "data-model-create-class-table" . }}
TODO
{{ else }}

You need to upload data so the model can train.

{{ template "data-model-create-class-table" . }}
TODO
{{ end }}
{{ end }} {{ define "train-model-card" }}
{{ if .HasData }} {{/* TODO expading mode */}}
Model Type
{{/* TODO allow more models to be created */}}
{{/* TODO to Change the acc */}}
{{/* TODO allow to chose the base of the model */}} {{/* TODO allow to change the shape of the model */}} {{ else }}

Please provide data to the model first

{{ end }}
{{ end }} {{ define "run-model-card" }}
{{ if .Result }}
Img Class: {{.Result}}
{{ end }}
Run image through them model and get the result
{{ end }} {{ define "mainbody" }}
{{ if (eq .Model.Status 1) }}

{{ .Model.Name }}

Preparing the model

{{ else if (eq .Model.Status -1) }}

{{ .Model.Name }}

Failed to prepare model

{{/* PRE TRAINING STATUS */}} {{ else if (eq .Model.Status 2) }} {{ template "base-model-card" . }} {{ template "data-model-card" . }} {{ template "train-model-card" . }} {{ template "delete-model-card" . }} {{/* FAILED TO PROCCESS THE ZIPFILE */}} {{ else if (eq .Model.Status -2)}} {{ template "base-model-card" . }}
Failed to proccess the zip file.
Delete file and proccess afain.

{{ template "delete-model-card" . }} {{/* PROCCESS THE ZIPFILE */}} {{ else if (eq .Model.Status 3)}} {{ template "base-model-card" . }}
{{/* TODO improve this */}} Processing zip file...
{{/* FAILED TO Prepare for training */}} {{ else if or (eq .Model.Status -3) (eq .Model.Status -4)}} {{ template "base-model-card" . }}
Failed Prepare for training.
{{ template "delete-model-card" . }} {{ else if (eq .Model.Status 4)}} {{ template "base-model-card" . }}
{{/* TODO improve this */}} Training the model...
{{/* TODO Add progress status on definitions */}} {{/* TODO Add aility to stop training */}}
{{/* Model Ready */}} {{ else if (eq .Model.Status 5)}} {{ template "base-model-card" . }} {{ template "run-model-card" . }} {{ template "delete-model-card" . }} {{ else }}

Unknown Status of the model.

{{ end }}
{{ end }}