mirror of
https://github.com/osmarks/meme-search-engine.git
synced 2024-11-13 07:19:54 +00:00
Improved UI for sliders
This commit is contained in:
parent
d8c147df52
commit
978aadda6a
@ -105,7 +105,7 @@
|
||||
<span>[embedding loaded from URL]</span>
|
||||
{/if}
|
||||
{#if term.type === "predefined_embedding"}
|
||||
<span>{term.predefinedEmbedding}</span>
|
||||
<span>{term.sign === "-" ? invertEmbeddingDesc(term.predefinedEmbedding) : term.predefinedEmbedding}</span>
|
||||
{/if}
|
||||
</li>
|
||||
{/each}
|
||||
@ -185,6 +185,12 @@
|
||||
predefinedEmbeddingName = "Sliders"
|
||||
}
|
||||
|
||||
const invertEmbeddingDesc = x => {
|
||||
const [fst, snd] = x.split("/")
|
||||
if (snd === undefined) return "Not " + fst
|
||||
return `${snd}/${fst}`
|
||||
}
|
||||
|
||||
const decodeFloat16 = uint16 => {
|
||||
const sign = (uint16 & 0x8000) ? -1 : 1
|
||||
const exponent = (uint16 & 0x7C00) >> 10
|
||||
|
Loading…
Reference in New Issue
Block a user