coyotte508 HF staff commited on
Commit
b6eff4d
1 Parent(s): 723c3de

Also allow .model files

Browse files
Files changed (1) hide show
  1. src/lib/check-filename.ts +3 -2
src/lib/check-filename.ts CHANGED
@@ -3,10 +3,11 @@ export function checkFilename(filename: string) {
3
  !filename.endsWith('.safetensors') &&
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('/');
 
3
  !filename.endsWith('.safetensors') &&
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, .model, .gguf or .json extension');
11
  }
12
 
13
  const split = filename.split('/');