chore: update to go packages versions

This commit is contained in:
2024-01-31 21:48:35 +00:00
parent c00bd87cf7
commit d08a0a2a4c
8 changed files with 503 additions and 107 deletions

View File

@@ -21,7 +21,7 @@
<label for="file">Base image</label>
<div class="form-msg">
Please provide a base image.<br/>
This image is a sample of the images that you are going to classfy.
This image is a sample of the images that you are going to classfiy.
</div>
<div class="icon-holder">
<button class="icon">
@@ -33,7 +33,10 @@
<input id="file" name="file" type="file" required accept="image/png,image/jpeg" />
</div>
</fieldset>
<button>
<button hx-indicator="#spinner" >
Create
</button>
<button disabled id="spinner" class="htmx-indicator">
Create
</button>
</form>

View File

@@ -24,10 +24,9 @@
{{ define "delete-model-card" }}
<form hx-delete="/models/delete" hx-headers='{"REQUEST-TYPE": "html"}' hx-swap="outerHTML" {{ if .Error }} class="submitted" {{end}} >
<fieldset>
<span>
<label for="name">
To delete this model please type "{{ .Model.Name }}":
</span>
<label for="name">Name</label>
</label>
<input name="name" id="name" required />
{{ if .NameDoesNotMatch }}
<span class="form-msg red">
@@ -117,7 +116,7 @@
</div>
<div class="grow-1 flex justify-start align-center">
{{ if lt (mul .Page 10) .Count }}
{{ if .ShowNext }}
<button
hx-get="/models/data/list?id={{ .Id }}&page={{ add .Page 1 }}"
hx-target=".content[data-tab='{{ .Name }}']"
@@ -283,9 +282,17 @@
{{ define "train-model-card" }}
<form hx-post="/models/train" hx-headers='{"REQUEST-TYPE": "html"}' hx-swap="outerHTML" {{ if .Error }} class="submitted" {{end}} >
{{ if .HasData }}
{{ if gt .NumberOfInvalidImages 0 }}
{{ if .NumberOfInvalidImages }}
{{ if gt .NumberOfInvalidImages 0 }}
<p class="danger">
There are images {{ .NumberOfInvalidImages }} that were loaded that do not have the correct format. These images will be delete when the model trains.
</p>
<input type="hidden" value="{{ .NumberOfInvalidImages }}" name="id" />
{{ end }}
{{ end }}
{{ if .ErrorMessage }}
<p class="danger">
There are images {{ .NumberOfInvalidImages }} that were loaded that do not have the correct format. These images will be delete when the model trains.
{{ .ErrorMessage }}
</p>
{{ end }}
{{/* TODO expading mode */}}
@@ -296,7 +303,9 @@
</legend>
<div class="input-radial">
<input id="model_type_simple" value="simple" name="model_type" type="radio" checked />
<label for="model_type_simple">Simple</label>
<label for="model_type_simple">Simple</label><br/>
<input id="model_type_expandable" value="expandable" name="model_type" type="radio" />
<label for="model_type_expandable">Expandable</label>
</div>
</fieldset>
{{/* TODO allow more models to be created */}}
@@ -400,7 +409,7 @@
{{ template "base-model-card" . }}
<form hx-delete="/models/data/delete-zip-file" hx-headers='{"REQUEST-TYPE": "html"}' hx-swap="outerHTML">
Failed to proccess the zip file.<br/>
Delete file and proccess afain.<br/>
Delete file and proccess again.<br/>
<br/>
<div class="spacer" ></div>
<input type="hidden" name="id" value="{{ .Model.Id }}" />