feat: closes #66

This commit is contained in:
Andre Henriques 2024-02-19 12:17:52 +00:00
parent 4985c8aa14
commit 0fe7c51bab

View File

@ -336,15 +336,6 @@
{{ define "run-model-card" }} {{ define "run-model-card" }}
<form hx-headers='{"REQUEST-TYPE": "html"}' enctype="multipart/form-data" hx-post="/models/run" hx-swap="outerHTML"> <form hx-headers='{"REQUEST-TYPE": "html"}' enctype="multipart/form-data" hx-post="/models/run" hx-swap="outerHTML">
{{ if .NotFound }}
<div>
The class was not found
</div>
{{ else if .Result }}
<div>
Img Class: {{.Result}}
</div>
{{ end }}
<input type="hidden" name="id" value={{.Model.Id}} /> <input type="hidden" name="id" value={{.Model.Id}} />
<fieldset class="file-upload" > <fieldset class="file-upload" >
<label for="file">Image</label> <label for="file">Image</label>
@ -369,6 +360,20 @@
<button> <button>
Run Run
</button> </button>
{{ if .NotFound }}
<div class="result">
<h1>
The class was not found
</h1>
</div>
{{ else if .Result }}
<div>
<h1>
Result
</h1>
The image was classified as {{.Result}}
</div>
{{ end }}
</form> </form>
{{ end }} {{ end }}