wangrongsheng commited on
Commit
fe7fe2a
1 Parent(s): 88b741a

support two models

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,8 +38,8 @@ if torch.cuda.is_available():
38
  tokenizer.use_default_system_prompt = False
39
 
40
  model_id_zh = "FarReelAILab/Machine_Mindset_zh_INTJ"
41
- model_zh = AutoModelForCausalLM.from_pretrained(model_id_zh, torch_dtype=torch.float16, device_map="auto")
42
- tokenizer_zh = AutoTokenizer.from_pretrained(model_id_zh)
43
  tokenizer_zh.use_default_system_prompt = False
44
 
45
 
 
38
  tokenizer.use_default_system_prompt = False
39
 
40
  model_id_zh = "FarReelAILab/Machine_Mindset_zh_INTJ"
41
+ model_zh = AutoModelForCausalLM.from_pretrained(model_id_zh, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True)
42
+ tokenizer_zh = AutoTokenizer.from_pretrained(model_id_zh, trust_remote_code=True)
43
  tokenizer_zh.use_default_system_prompt = False
44
 
45