{#snippet modality_icon(key: string)} {#if key === "image"} {:else if key === "audio"} {:else if key === "video"} {:else if key === "3d"} {:else if key === "text"} {:else if key === "data"} {/if} {/snippet}
e.stopPropagation()} onwheel={(e) => e.stopPropagation()} > {#if is_dataset}
Filter {modality.label}
{/if}
{#if !is_dataset} {/if}
{#if !is_dataset}
{#if is_all}
All tasks
{#each sidebar_groups as group (group.modality.key)}
{@render modality_icon(group.modality.key)} {group.modality.label}
{#each group.subtabs as st (st.key)} {/each} {/each} {:else}
{@render modality_icon(modality.key)} {modality.label} tasks
{#each sidebar_groups[0]?.subtabs ?? [] as st (st.key)} {/each} {/if}
{/if}
{#if pinned_loading}
Resolving repo…
{:else if pinned_error && !pinned_result}
{pinned_error}
{:else if pinned_result} {@const pinned = pinned_result}
handle_row_click(pinned)} role="button" tabindex="0" title={pinned.curated ? `Use this exact ${pinned.type}` : `Use this exact ${pinned.type} — not in our verified catalog`} >
{avatar_initial(pinned.id)}
{pinned.title || (pinned.id.split("/").pop() ?? pinned.id)} {pinned.type === "model" ? "Model" : "Space"} {#if pinned.curated} ✓ Verified {:else} Unverified {/if} {#if pinned.type === "space" && pinned.zero_gpu} ⚡ ZeroGPU {/if} {#if pinned.pipeline_tag} {pinned.pipeline_tag} {/if}
{#if pinned.curated} Use this exact {pinned.type} {#if pinned.description} — {pinned.description}{/if} {:else} Not in our verified catalog — may not work. {pinned.description || ""} {/if}
{#if pinned_error}
{pinned_error}
{/if} {/if} {#if loading && !has_results}
{:else if !has_results && !pinned_result}
{search_query.length >= 2 ? "Nothing found" : is_all ? "No results found" : `No ${modality.label.toLowerCase()} results found`}
{:else if is_dataset} {#each dataset_results as dataset (dataset.id)}
handle_row_click(dataset)} role="button" tabindex="0" >
{avatar_initial(dataset.id)}
{dataset.title || (dataset.id.split("/").pop() ?? dataset.id)}
{#if dataset.description}
{dataset.description}
{/if}
{#if loading_space_id === dataset.id} {:else if dataset.likes > 0} ♥ {format_likes(dataset.likes)} {/if} e.stopPropagation()} onmousedown={(e) => e.stopPropagation()} >
{/each} {:else} {#if space_results.length > 0}
Curated Spaces
{#each space_results as space (space.id)}
handle_row_click(space)} role="button" tabindex="0" title={space.title || space.id} >
{#if space.thumbnail || SPACE_IMAGES[space.id]} {space.title {:else}
{avatar_initial(space.id)}
{/if} {#if space.zero_gpu} ⚡ ZeroGPU {/if} {#if loading_space_id === space.id}
{/if}
{space.title || (space.id.split("/").pop() ?? space.id)}
{#if space.likes > 0} ♥ {format_likes(space.likes)} {/if} {#if space.pipeline_tag} {space.pipeline_tag} {/if}
{/each}
{/if} {#if model_results.length > 0}
Curated Models
{#each model_results as model (model.id)}
handle_row_click(model)} role="button" tabindex="0" title={model.id} >
{#if model.thumbnail || SPACE_IMAGES[model.id]} {model.title {:else}
{avatar_initial(model.id)}
{/if}
{model.title || (model.id.split("/").pop() ?? model.id)}
{model.id.split("/")[0]} {#if model.likes > 0} ♥ {format_likes(model.likes)} {/if} {#if model.pipeline_tag} {model.pipeline_tag} {/if}
{/each}
{/if} {/if}