Spaces:
Running
Running
add .model extension for spiece.model file from tokenizer
Browse files
src/lib/check-filename.ts
CHANGED
@@ -4,9 +4,10 @@ export function checkFilename(filename: string) {
|
|
4 |
!filename.endsWith('.json') &&
|
5 |
!filename.endsWith('.gguf') &&
|
6 |
!filename.endsWith('.txt') &&
|
|
|
7 |
!filename.endsWith('/')
|
8 |
) {
|
9 |
-
throw new Error('Files must have a .safetensors, .txt, .gguf or .json extension');
|
10 |
}
|
11 |
|
12 |
const split = filename.split('/');
|
|
|
4 |
!filename.endsWith('.json') &&
|
5 |
!filename.endsWith('.gguf') &&
|
6 |
!filename.endsWith('.txt') &&
|
7 |
+
!filename.endsWith('.model') &&
|
8 |
!filename.endsWith('/')
|
9 |
) {
|
10 |
+
throw new Error('Files must have a .safetensors, .txt, .gguf or .json or .model extension');
|
11 |
}
|
12 |
|
13 |
const split = filename.split('/');
|