2023-09-21 15:38:02 +01:00
|
|
|
{{define "title"}}
|
|
|
|
Create New Model : AI Stuff
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "mainbody"}}
|
|
|
|
<main>
|
|
|
|
<h1>
|
|
|
|
Create new Model
|
|
|
|
</h1>
|
|
|
|
<form enctype="multipart/form-data" action="/models/add" method="POST" {{if .Submited}}class="submitted"{{end}} >
|
|
|
|
<fieldset>
|
|
|
|
<label for="name">Name</label>
|
|
|
|
<input id="name" name="name" required {{if .Name}} value="{{.Name}}" {{end}} />
|
|
|
|
{{if .NameFoundError}}
|
|
|
|
<span class="form-msg error">
|
|
|
|
You already have a model with that name.
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
</fieldset>
|
|
|
|
<fieldset class="file-upload" >
|
|
|
|
<label for="file">Base image</label>
|
|
|
|
<div class="form-msg">
|
|
|
|
Please provide a base image.<br/>
|
2024-01-31 21:48:35 +00:00
|
|
|
This image is a sample of the images that you are going to classfiy.
|
2023-09-21 15:38:02 +01:00
|
|
|
</div>
|
|
|
|
<div class="icon-holder">
|
|
|
|
<button class="icon">
|
|
|
|
<img replace="true" src="/imgs/upload-icon.png" />
|
|
|
|
<span replace="Image selected">
|
|
|
|
Upload image
|
|
|
|
</span>
|
|
|
|
</button>
|
2023-10-06 10:46:45 +01:00
|
|
|
<input id="file" name="file" type="file" required accept="image/png,image/jpeg" />
|
2023-09-21 15:38:02 +01:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
2024-01-31 21:48:35 +00:00
|
|
|
<button hx-indicator="#spinner" >
|
|
|
|
Create
|
|
|
|
</button>
|
|
|
|
<button disabled id="spinner" class="htmx-indicator">
|
2023-09-21 15:38:02 +01:00
|
|
|
Create
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</main>
|
|
|
|
{{end}}
|