Spaces:
Sleeping
Sleeping
Add txt extension to DDUF (#1)
Browse files- Add txt extension to DDUF (5ce247dfc59661fa652993ea4c5c1e3dd7af57af)
Co-authored-by: Eliott Coyac <[email protected]>
src/lib/check-filename.ts
CHANGED
@@ -3,9 +3,10 @@ export function checkFilename(filename: string) {
|
|
3 |
!filename.endsWith('.safetensors') &&
|
4 |
!filename.endsWith('.json') &&
|
5 |
!filename.endsWith('.gguf') &&
|
|
|
6 |
!filename.endsWith('/')
|
7 |
) {
|
8 |
-
throw new Error('Files must have a .safetensors, .gguf or .json extension');
|
9 |
}
|
10 |
|
11 |
const split = filename.split('/');
|
|
|
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('/');
|