Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: downloaded model hub screen should from variant level instead of the model level

Faisal Amir9e3237da38a3
diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsx
index c58fa3169..ffacd2f04 100644
--- a/web-app/src/routes/hub/index.tsx
+++ b/web-app/src/routes/hub/index.tsx
@@ -146,13 +146,14 @@ function Hub() {
}
// Apply downloaded filter
if (showOnlyDownloaded) {
- filtered = filtered?.filter((model) =>
- model.quants.some((variant) =>
+ filtered = filtered?.map((model) => ({
+ ...model,
+ quants: model.quants.filter((variant) =>
llamaProvider?.models.some(
(m: { id: string }) => m.id === variant.model_id
)
)
- )
+ })).filter((model) => model.quants.length > 0)
}
// Add HuggingFace repo at the beginning if available
if (huggingFaceRepo) {