2024-03-27 20:10:58 +00:00
<!DOCTYPE html>
< html lang = "en" >
2024-03-28 20:52:52 +00:00
{{template "views/partials/head" .}}
2024-03-27 20:10:58 +00:00
2024-03-28 20:52:52 +00:00
< body class = "bg-gray-900 text-gray-200" >
2024-03-27 20:10:58 +00:00
< div class = "flex flex-col min-h-screen" >
{{template "views/partials/navbar" .}}
< div class = "container mx-auto px-4 flex-grow" >
< div class = "header text-center py-12" >
2024-03-28 20:52:52 +00:00
< h1 class = "text-5xl font-bold text-gray-100" > Welcome to < i > your< / i > LocalAI instance!< / h1 >
2024-03-27 20:10:58 +00:00
< p class = "mt-4 text-lg" > The FOSS alternative to OpenAI, Claude, ...< / p >
2024-03-28 20:52:52 +00:00
< a href = "https://localai.io" target = "_blank" class = "mt-4 inline-block bg-blue-500 text-white py-2 px-4 rounded-lg shadow transition duration-300 ease-in-out hover:bg-blue-700 hover:shadow-lg" >
< i class = "fas fa-book-reader pr-2" > < / i > Documentation
2024-05-06 23:17:07 +00:00
< / a >
2024-03-27 20:10:58 +00:00
< / div >
2024-05-07 22:42:34 +00:00
< div class = "models mt-4" >
2024-05-08 17:34:33 +00:00
{{template "views/partials/inprogress" .}}
2024-05-07 22:42:34 +00:00
2024-05-06 23:17:07 +00:00
{{ if eq (len .ModelsConfig) 0 }}
< h2 class = "text-center text-3xl font-semibold text-gray-100" > < i class = "text-yellow-200 ml-2 fa-solid fa-triangle-exclamation animate-pulse" > < / i > Ouch! seems you don't have any models installed!< / h2 >
< p class = "text-center mt-4 text-xl" > ..install something from the < a class = "text-gray-400 hover:text-white ml-1 px-3 py-2 rounded" href = "/browse" > 🖼️ Gallery< / a > or check the < a href = "https://localai.io/basics/getting_started/" class = "text-gray-400 hover:text-white ml-1 px-3 py-2 rounded" > < i class = "fa-solid fa-book" > < / i > Getting started documentation < / a > < / p >
{{ else }}
2024-03-28 20:52:52 +00:00
< h2 class = "text-center text-3xl font-semibold text-gray-100" > Installed models< / h2 >
2024-03-27 20:10:58 +00:00
< p class = "text-center mt-4 text-xl" > We have {{len .ModelsConfig}} pre-loaded models available.< / p >
2024-05-07 22:42:34 +00:00
< table class = "table-auto mt-4 w-full text-left text-gray-200" >
< thead class = "text-xs text-gray-400 uppercase bg-gray-700" >
< tr >
< th class = "px-4 py-2" > < / th >
< th class = "px-4 py-2" > Model Name< / th >
< th class = "px-4 py-2" > Backend< / th >
< th class = "px-4 py-2 float-right" > Actions< / th >
< / tr >
< / thead >
< tbody >
2024-05-06 23:17:07 +00:00
{{$galleryConfig:=.GalleryConfig}}
2024-05-07 22:42:34 +00:00
{{$noicon:="https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg"}}
2024-03-27 20:10:58 +00:00
{{ range .ModelsConfig }}
2024-05-06 23:17:07 +00:00
{{ $cfg:= index $galleryConfig .Name}}
2024-05-07 22:42:34 +00:00
< tr class = "bg-gray-800 border-b border-gray-700" >
< td class = "px-4 py-3" >
{{ with $cfg }}
2024-05-06 23:17:07 +00:00
< img { { if $ cfg . Icon } }
src="{{$cfg.Icon}}"
{{ else }}
2024-05-07 22:42:34 +00:00
src="{{$noicon}}"
2024-05-06 23:17:07 +00:00
{{ end }}
class="rounded-t-lg max-h-24 max-w-24 object-cover mt-3"
>
2024-05-07 22:42:34 +00:00
{{ else}}
< img src = "{{$noicon}}" class = "rounded-t-lg max-h-24 max-w-24 object-cover mt-3" >
{{ end }}
< / td >
< td class = "px-4 py-3 font-bold" >
< p class = "font-bold text-white flex items-center" > < i class = "fas fa-brain pr-2" > < / i > < a href = "/browse?term={{.Name}}" > {{.Name}}< / a > < / p >
< / td >
< td class = "px-4 py-3 font-bold" >
2024-03-28 20:52:52 +00:00
{{ if .Backend }}
<!-- Badge for Backend -->
< span class = "inline-block bg-blue-500 text-white py-1 px-3 rounded-full text-xs" >
{{.Backend}}
< / span >
{{ else }}
< span class = "inline-block bg-yellow-500 text-white py-1 px-3 rounded-full text-xs" >
auto
< / span >
{{ end }}
2024-05-07 22:42:34 +00:00
< / td >
2024-05-06 23:17:07 +00:00
2024-05-08 17:34:33 +00:00
< td class = "px-4 py-3" >
2024-05-06 23:17:07 +00:00
< button
class="float-right inline-block rounded bg-red-800 px-6 pb-2.5 mb-3 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-primary-3 transition duration-150 ease-in-out hover:bg-red-accent-300 hover:shadow-red-2 focus:bg-red-accent-300 focus:shadow-primary-2 focus:outline-none focus:ring-0 active:bg-red-600 active:shadow-primary-2 dark:shadow-black/30 dark:hover:shadow-dark-strong dark:focus:shadow-dark-strong dark:active:shadow-dark-strong"
data-twe-ripple-color="light" data-twe-ripple-init="" hx-confirm="Are you sure you wish to delete the model?" hx-post="/browse/delete/model/{{.Name}}" hx-swap="outerHTML">< i class = "fa-solid fa-cancel pr-2" > < / i > Delete< / button >
2024-05-07 22:42:34 +00:00
< / td >
2024-03-27 20:10:58 +00:00
{{ end }}
2024-05-07 22:42:34 +00:00
< / tbody >
< / table >
2024-05-06 23:17:07 +00:00
{{ end }}
2024-05-07 22:42:34 +00:00
2024-03-27 20:10:58 +00:00
< / div >
< / div >
2024-03-28 20:52:52 +00:00
2024-03-27 20:10:58 +00:00
{{template "views/partials/footer" .}}
< / div >
< / body >
< / html >