mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +00:00
6559ac11b1
* feat(ui): allow to set system prompt for chat Make also the models in the index clickable, and display as table Fixes #2257 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(vision): support also png with base64 input Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat(ui): support vision and upload of files Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * display the processed image Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * make trust remote code stand out Signed-off-by: mudler <mudler@localai.io> * feat(ui): track in progress job across index/model gallery Signed-off-by: mudler <mudler@localai.io> * minor fixups Signed-off-by: mudler <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: mudler <mudler@localai.io>
108 lines
6.2 KiB
HTML
108 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
{{template "views/partials/head" .}}
|
|
|
|
<body class="bg-gray-900 text-gray-200">
|
|
<div class="flex flex-col min-h-screen">
|
|
|
|
{{template "views/partials/navbar" .}}
|
|
<div class="container mx-auto px-4 flex-grow">
|
|
|
|
<div class="models mt-12">
|
|
<h2 class="text-center text-3xl font-semibold text-gray-100">
|
|
🖼️ Available models from <i>{{ len .Repositories }}</i> repositories <a href="https://localai.io/models/" target="_blank" >
|
|
<i class="fas fa-circle-info pr-2"></i>
|
|
</a></h2>
|
|
|
|
<div class="text-center font-semibold text-gray-100">
|
|
<h2>Filter by type:</h2>
|
|
<button hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "tts"}'
|
|
hx-indicator=".htmx-indicator" >TTS</button>
|
|
<button hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "stablediffusion"}'
|
|
hx-indicator=".htmx-indicator" >Image generation</button>
|
|
<button hx-post="/browse/search/models" \
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "llm"}'
|
|
hx-indicator=".htmx-indicator" >Text generation</button>
|
|
<button hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "multimodal"}'
|
|
hx-indicator=".htmx-indicator" >Multimodal</button>
|
|
<button hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "embedding"}'
|
|
hx-indicator=".htmx-indicator" >Embeddings</button>
|
|
<button hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "rerank"}'
|
|
hx-indicator=".htmx-indicator" >Rerankers</button>
|
|
<button
|
|
hx-post="/browse/search/models"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
hx-target="#search-results"
|
|
hx-vals='{"search": "whisper"}'
|
|
hx-indicator=".htmx-indicator" >Audio transcription</button>
|
|
</div>
|
|
|
|
<div class="text-center text-xs font-semibold text-gray-100">
|
|
Filter by tags:
|
|
{{ range .AllTags }}
|
|
<button hx-post="/browse/search/models" class="text-blue-500" hx-target="#search-results"
|
|
hx-vals='{"search": "{{.}}"}'
|
|
hx-indicator=".htmx-indicator" >{{.}}</button>
|
|
{{ end }}
|
|
</div>
|
|
|
|
|
|
<span class="htmx-indicator loader"></span>
|
|
<!-- Show in progress operations-->
|
|
{{ if .ProcessingModels }}
|
|
<h2
|
|
class="mt-4 mb-4 text-center text-3xl font-semibold text-gray-100">Operations in progress</h2>
|
|
{{end}}
|
|
{{$taskType:=.TaskTypes}}
|
|
{{ range $key,$value:=.ProcessingModels }}
|
|
{{ $op := index $taskType $key}}
|
|
{{$parts := split "@" $key}}
|
|
<div class="flex items-center justify-between bg-slate-600 p-2 mb-2 rounded-md">
|
|
<div class="flex items center">
|
|
<span class="text-gray-300"><a href="/browse?term={{$parts._1}}"
|
|
class="text-white-500 inline-block bg-blue-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2 hover:bg-gray-300 hover:shadow-gray-2"
|
|
>{{$parts._1}}</a> (from the '{{$parts._0}}' repository)</span>
|
|
</div>
|
|
<div hx-get="/browse/job/{{$value}}" hx-swap="innerHTML" hx-target="this" hx-trigger="done">
|
|
<h3 role="status" id="pblabel" >{{$op}}
|
|
<div hx-get="/browse/job/progress/{{$value}}" hx-trigger="every 600ms" hx-target="this"
|
|
hx-swap= "innerHTML" ></div></h3>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
<!-- END Show in progress operations-->
|
|
|
|
<input class="form-control appearance-none block w-full mt-5 px-3 py-2 text-base font-normal text-gray-300 pb-2 mb-5 bg-gray-800 bg-clip-padding border border-solid border-gray-600 rounded transition ease-in-out m-0 focus:text-gray-300 focus:bg-gray-900 focus:border-blue-500 focus:outline-none" type="search"
|
|
name="search" placeholder="Begin Typing To Search models..."
|
|
hx-post="/browse/search/models"
|
|
hx-trigger="input changed delay:500ms, search"
|
|
hx-target="#search-results"
|
|
hx-indicator=".htmx-indicator">
|
|
|
|
<div id="search-results">{{.Models}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{template "views/partials/footer" .}}
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|