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.

chore: update handle download variant

Faisal Amir1f0e79e934f2
diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsx
index 7004f356e..bf6e06157 100644
--- a/web-app/src/routes/hub/index.tsx
+++ b/web-app/src/routes/hub/index.tsx
@@ -745,10 +745,16 @@ function Hub() {
title={t('hub:downloadModel')}
onClick={() => {
addLocalDownloadingModel(
- variant.model_id
+ variant.model_id.replace(
+ /[^a-zA-Z0-9/_\-.]/g,
+ ''
+ )
)
pullModel(
- variant.model_id,
+ variant.model_id.replace(
+ /[^a-zA-Z0-9/_\-.]/g,
+ ''
+ ),
variant.path
)
}}