Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -70,13 +70,14 @@ def load_model(model_path, progress=gr.Progress()):
|
|
70 |
|
71 |
try:
|
72 |
progress(0.3, desc="Loading tokenizer...")
|
73 |
-
current_tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
|
74 |
|
75 |
progress(0.5, desc="Loading model...")
|
76 |
current_model = AutoModelForCausalLM.from_pretrained(
|
77 |
model_path,
|
78 |
device_map="auto",
|
79 |
-
torch_dtype=torch.float16
|
|
|
80 |
)
|
81 |
|
82 |
current_model_path = model_path
|
|
|
70 |
|
71 |
try:
|
72 |
progress(0.3, desc="Loading tokenizer...")
|
73 |
+
current_tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False,trust_remote_code=True,)
|
74 |
|
75 |
progress(0.5, desc="Loading model...")
|
76 |
current_model = AutoModelForCausalLM.from_pretrained(
|
77 |
model_path,
|
78 |
device_map="auto",
|
79 |
+
torch_dtype=torch.float16,
|
80 |
+
trust_remote_code=True,
|
81 |
)
|
82 |
|
83 |
current_model_path = model_path
|