Spaces:
Paused
Paused
rodrigomasini
commited on
Commit
·
1784d72
1
Parent(s):
a110fec
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,11 @@ import os
|
|
8 |
|
9 |
cwd = os.getcwd()
|
10 |
cachedir = cwd+'/cache'
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
os.environ['HF_HOME'] = cachedir
|
13 |
|
14 |
local_folder = cachedir + "/model"
|
@@ -24,7 +28,7 @@ use_strict = False
|
|
24 |
|
25 |
use_triton = False
|
26 |
|
27 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
28 |
|
29 |
quantize_config = BaseQuantizeConfig(
|
30 |
bits=4,
|
|
|
8 |
|
9 |
cwd = os.getcwd()
|
10 |
cachedir = cwd+'/cache'
|
11 |
+
|
12 |
+
# Check if the directory exists before creating it
|
13 |
+
if not os.path.exists(cachedir):
|
14 |
+
os.mkdir(cachedir)
|
15 |
+
|
16 |
os.environ['HF_HOME'] = cachedir
|
17 |
|
18 |
local_folder = cachedir + "/model"
|
|
|
28 |
|
29 |
use_triton = False
|
30 |
|
31 |
+
tokenizer = AutoTokenizer.from_pretrained(local_folder, use_fast=False)
|
32 |
|
33 |
quantize_config = BaseQuantizeConfig(
|
34 |
bits=4,
|