Spaces:
Sleeping
Sleeping
File size: 2,062 Bytes
01b06a3 df5291c cdc7abc 01b06a3 a1a6daf 01b06a3 a1a6daf 01b06a3 284d5a8 01b06a3 95af686 01b06a3 a254c1f 01b06a3 95af686 01b06a3 95af686 01b06a3 a254c1f 01b06a3 cdc7abc 01b06a3 d947276 df5291c a254c1f df5291c a254c1f df5291c 01b06a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | <script lang="ts">
import CarbonEarth from "~icons/carbon/earth";
import CarbonArrowUpRight from "~icons/carbon/arrow-up-right";
import BIMeta from "~icons/bi/meta";
import CarbonCode from "~icons/carbon/code";
import type { Model } from "$lib/types/Model";
interface Props {
model: Pick<
Model,
"name" | "datasetName" | "websiteUrl" | "modelUrl" | "datasetUrl" | "hasInferenceAPI"
>;
variant?: "light" | "dark";
}
let { model, variant = "light" }: Props = $props();
</script>
<div
class="flex items-center gap-5 rounded-xl bg-gray-100 px-3 py-2 text-xs sm:text-sm
{variant === 'dark'
? 'text-gray-600 dark:bg-gray-800 dark:text-gray-300'
: 'text-gray-800 dark:bg-gray-100 dark:text-gray-600'}"
>
<a
href={model.modelUrl || "https://huggingface.co/" + model.name}
target="_blank"
rel="noreferrer"
class="flex items-center hover:underline"
><CarbonArrowUpRight class="mr-1.5 shrink-0 text-xs text-gray-400" />
Mudel
<div class="max-sm:hidden"> leht</div></a
>
{#if model.datasetName || model.datasetUrl}
<a
href={model.datasetUrl || "https://huggingface.co/datasets/" + model.datasetName}
target="_blank"
rel="noreferrer"
class="flex items-center hover:underline"
><CarbonArrowUpRight class="mr-1.5 shrink-0 text-xs text-gray-400" />
Andmekogum
<div class="max-sm:hidden"> leht</div></a
>
{/if}
{#if model.hasInferenceAPI}
<a
href={"https://huggingface.co/playground?modelId=" + model.name}
target="_blank"
rel="noreferrer"
class="flex items-center hover:underline"
><CarbonCode class="mr-1.5 shrink-0 text-xs text-gray-400" />
API
</a>
{/if}
{#if model.websiteUrl}
<a
href={model.websiteUrl}
target="_blank"
class="ml-auto flex items-center hover:underline"
rel="noreferrer"
>
{#if model.name.startsWith("meta-llama/Meta-Llama")}
<BIMeta class="mr-1.5 shrink-0 text-xs text-gray-400" />
Ehitatud koos Llama
{:else}
<CarbonEarth class="mr-1.5 shrink-0 text-xs text-gray-400" />
Veebileht
{/if}
</a>
{/if}
</div>
|