45 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{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/>
 | 
						|
                    This image is a sample of the images that you are going to classfiy.
 | 
						|
                </div>
 | 
						|
                <div class="icon-holder">
 | 
						|
                    <button class="icon">
 | 
						|
                        <img replace="true" src="/imgs/upload-icon.png" />
 | 
						|
                        <span replace="Image selected">
 | 
						|
                            Upload image
 | 
						|
                        </span>
 | 
						|
                    </button>
 | 
						|
                    <input id="file" name="file" type="file" required accept="image/png,image/jpeg" />
 | 
						|
                </div>
 | 
						|
            </fieldset>
 | 
						|
            <button hx-indicator="#spinner" >
 | 
						|
                Create
 | 
						|
            </button>
 | 
						|
            <button disabled id="spinner" class="htmx-indicator">
 | 
						|
                Create
 | 
						|
            </button>
 | 
						|
        </form>
 | 
						|
    </main>
 | 
						|
{{end}}
 |