Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 8 |
|
| 9 |
def init_model():
|
| 10 |
model = AutoModelForCausalLM.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", device_map="cuda:0", torch_dtype=torch.float16, trust_remote_code=True)
|
| 11 |
-
tokenizer = AutoTokenizer.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", use_fast=
|
| 12 |
return model, tokenizer
|
| 13 |
|
| 14 |
|
|
|
|
| 8 |
|
| 9 |
def init_model():
|
| 10 |
model = AutoModelForCausalLM.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", device_map="cuda:0", torch_dtype=torch.float16, trust_remote_code=True)
|
| 11 |
+
tokenizer = AutoTokenizer.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", use_fast=False, trust_remote_code=True)
|
| 12 |
return model, tokenizer
|
| 13 |
|
| 14 |
|