Guanzheng commited on
Commit
3cb0639
·
1 Parent(s): 672cd19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,8 +48,8 @@ if not torch.cuda.is_available():
48
  model_id = "DAMO-NLP-SG/CLEX-7b-Chat-16K"
49
  # from CLEX import LlamaForCausalLM
50
  from transformers import AutoModelForCausalLM
51
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
52
- tokenizer = AutoTokenizer.from_pretrained(model_id)
53
  tokenizer.use_default_system_prompt = False
54
 
55
  import PyPDF2
 
48
  model_id = "DAMO-NLP-SG/CLEX-7b-Chat-16K"
49
  # from CLEX import LlamaForCausalLM
50
  from transformers import AutoModelForCausalLM
51
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True)
52
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
53
  tokenizer.use_default_system_prompt = False
54
 
55
  import PyPDF2