2024-04-23 09:22:58 +02:00
|
|
|
<!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">
|
2024-04-23 18:43:25 +02:00
|
|
|
<h2 class="text-center text-3xl font-semibold text-gray-100">
|
2024-05-12 14:24:36 +02:00
|
|
|
🖼️ Available {{.AvailableModels}} models from <i>{{ len .Repositories }}</i> repositories <a href="https://localai.io/models/" target="_blank" >
|
2024-04-23 18:43:25 +02:00
|
|
|
<i class="fas fa-circle-info pr-2"></i>
|
|
|
|
</a></h2>
|
2024-05-07 01:17:07 +02:00
|
|
|
|
|
|
|
<div class="text-center font-semibold text-gray-100">
|
|
|
|
<h2>Filter by type:</h2>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models" \
|
2024-05-07 01:17:07 +02:00
|
|
|
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>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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>
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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
|
2025-01-07 17:18:21 +01:00
|
|
|
hx-post="browse/search/models"
|
2024-05-07 01:17:07 +02:00
|
|
|
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 }}
|
2025-01-07 17:18:21 +01:00
|
|
|
<button hx-post="browse/search/models" class="text-blue-500" hx-target="#search-results"
|
2024-05-07 01:17:07 +02:00
|
|
|
hx-vals='{"search": "{{.}}"}'
|
|
|
|
hx-indicator=".htmx-indicator" >{{.}}</button>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
2024-05-08 00:42:34 +02:00
|
|
|
|
2024-04-23 09:22:58 +02:00
|
|
|
<span class="htmx-indicator loader"></span>
|
2024-05-08 19:34:33 +02:00
|
|
|
{{template "views/partials/inprogress" .}}
|
2024-05-08 00:42:34 +02:00
|
|
|
|
|
|
|
<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"
|
2024-04-23 09:22:58 +02:00
|
|
|
name="search" placeholder="Begin Typing To Search models..."
|
2025-01-07 17:18:21 +01:00
|
|
|
hx-post="browse/search/models"
|
2024-04-23 09:22:58 +02:00
|
|
|
hx-trigger="input changed delay:500ms, search"
|
|
|
|
hx-target="#search-results"
|
|
|
|
hx-indicator=".htmx-indicator">
|
|
|
|
|
|
|
|
<div id="search-results">{{.Models}}</div>
|
2025-02-22 21:38:00 +01:00
|
|
|
<!-- Pagination -->
|
|
|
|
<div class="flex justify-center mt-5">
|
|
|
|
<div class="flex items
|
|
|
|
-center">
|
|
|
|
<button onclick="window.location.href='browse?page={{.PrevPage}}'" class="bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-gray-200 px-3 py-1 rounded-l-md" {{if not .PrevPage}}disabled{{end}}
|
|
|
|
><i class="fas fa-arrow-left"></i></button>
|
|
|
|
<button onclick="window.location.href='browse?page={{.NextPage}}'" class="bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-gray-200 px-3 py-1 rounded-r-md" {{if not .NextPage}}disabled{{end}}
|
|
|
|
><i class="fas fa-arrow-right"></i></button>
|
|
|
|
<!--
|
|
|
|
TODO: do not refresh the page, but use htmx.
|
|
|
|
This however requires the page calculation to be here instead that in the golang backend.
|
|
|
|
<button class="bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-gray-200 px-3 py-1 rounded-l-md"
|
|
|
|
hx-post="browse/search/models?page={{.PrevPage}}"
|
|
|
|
hx-target="#search-results"
|
|
|
|
hx-indicator=".htmx-indicator"
|
|
|
|
{{if not .PrevPage}}disabled{{end}}
|
|
|
|
>
|
|
|
|
<i class="fas fa-arrow-left"></i>
|
|
|
|
</button>
|
|
|
|
<button class="bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-gray-200 px-3 py-1 rounded-r-md"
|
|
|
|
hx-post="browse/search/models?page={{.NextPage}}"
|
|
|
|
hx-target="#search-results"
|
|
|
|
hx-indicator=".htmx-indicator"
|
|
|
|
{{if not .NextPage}}disabled{{end}}
|
|
|
|
>
|
|
|
|
<i class="fas fa-arrow-right"></i>
|
|
|
|
</button>
|
|
|
|
-->
|
|
|
|
</div>
|
2024-04-23 09:22:58 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "views/partials/footer" .}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|