File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,15 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
400
400
cfg .Debug = & trueV
401
401
}
402
402
403
+ if len (cfg .KnownUsecaseStrings ) == 0 {
404
+ // Infer use case if not provided
405
+ for k , usecase := range GetAllBackendConfigUsecases () {
406
+ if cfg .HasUsecases (usecase ) {
407
+ cfg .KnownUsecaseStrings = append (cfg .KnownUsecaseStrings , k )
408
+ }
409
+ }
410
+ }
411
+
403
412
guessDefaultsFromFile (cfg , lo .modelPath )
404
413
}
405
414
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ <h3 class="text-center text-xl font-semibold text-gray-100">
29
29
</ h3 >
30
30
{{ range .Models }}
31
31
< div class ="bg-gray-800 border-b border-gray-700 p-4 mt-4 ">
32
- < h4 class ="text-md font-bold text-gray-200 "> {{.}}</ h4 >
32
+ < h4 class ="text-md font-bold text-gray-200 "> {{.Name }}</ h4 >
33
33
</ div >
34
34
{{end}}
35
35
{{end}}
@@ -66,7 +66,18 @@ <h2 class="text-center text-3xl font-semibold text-gray-100">{{$modelsN}} Instal
66
66
{{ end }}
67
67
</ td >
68
68
< td class ="px-4 py-3 font-bold ">
69
- < p class ="font-bold text-white flex items-center "> < a href ="browse?term={{.Name}} "> {{.Name}}</ a > < a href ="chat/{{.Name}} "> < i class ="fas fa-comments "> </ i > </ a > </ p >
69
+ < p class ="font-bold text-white flex items-center "> {{.Name}} < a href ="browse?term={{.Name}} " class ="ml-2 text-blue-400 hover:text-blue-600 "> < i class ="fas fa-search "> </ i > </ a > </ p >
70
+ {{ range .KnownUsecaseStrings }}
71
+ {{ if eq . "FLAG_CHAT" }}
72
+ < a href ="chat/{{$cfg.Name}} " class ="ml-2 bg-blue-500 text-white py-1 px-3 rounded-lg shadow transition duration-300 ease-in-out hover:bg-blue-700 hover:shadow-lg "> < i class ="fas fa-comments pr-1 "> </ i > Chat</ a >
73
+ {{ end }}
74
+ {{ if eq . "FLAG_IMAGE" }}
75
+ < a href ="text2image/{{$cfg.Name}} " class ="ml-2 bg-green-500 text-white py-1 px-3 rounded-lg shadow transition duration-300 ease-in-out hover:bg-green-700 hover:shadow-lg "> < i class ="fas fa-image pr-1 "> </ i > Image</ a >
76
+ {{ end }}
77
+ {{ if eq . "FLAG_TTS" }}
78
+ < a href ="tts/{{$cfg.Name}} " class ="ml-2 bg-purple-500 text-white py-1 px-3 rounded-lg shadow transition duration-300 ease-in-out hover:bg-purple-700 hover:shadow-lg "> < i class ="fas fa-microphone pr-1 "> </ i > TTS</ a >
79
+ {{ end }}
80
+ {{ end }}
70
81
</ td >
71
82
< td class ="px-4 py-3 font-bold ">
72
83
{{ if .Backend }}
You can’t perform that action at this time.
0 commit comments