mirror of
https://github.com/osmarks/meme-search-engine.git
synced 2024-11-13 23:34:49 +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>
|
<span>[embedding loaded from URL]</span>
|
||||||
{/if}
|
{/if}
|
||||||
{#if term.type === "predefined_embedding"}
|
{#if term.type === "predefined_embedding"}
|
||||||
<span>{term.predefinedEmbedding}</span>
|
<span>{term.sign === "-" ? invertEmbeddingDesc(term.predefinedEmbedding) : term.predefinedEmbedding}</span>
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
@ -185,6 +185,12 @@
|
|||||||
predefinedEmbeddingName = "Sliders"
|
predefinedEmbeddingName = "Sliders"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const invertEmbeddingDesc = x => {
|
||||||
|
const [fst, snd] = x.split("/")
|
||||||
|
if (snd === undefined) return "Not " + fst
|
||||||
|
return `${snd}/${fst}`
|
||||||
|
}
|
||||||
|
|
||||||
const decodeFloat16 = uint16 => {
|
const decodeFloat16 = uint16 => {
|
||||||
const sign = (uint16 & 0x8000) ? -1 : 1
|
const sign = (uint16 & 0x8000) ? -1 : 1
|
||||||
const exponent = (uint16 & 0x7C00) >> 10
|
const exponent = (uint16 & 0x7C00) >> 10
|
||||||
|
Loading…
Reference in New Issue
Block a user