Luigi commited on
Commit
5799add
·
1 Parent(s): abaf626

enable trust_remote_code=True

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,7 +19,7 @@ MODEL_LIST = [
19
  @lru_cache(maxsize=None)
20
  def get_pipeline(model_name):
21
  tok = AutoTokenizer.from_pretrained(model_name)
22
- mdl = AutoModelForCausalLM.from_pretrained(model_name, weights_only=False)
23
  mdl.to("cuda")
24
  return pipeline("text-generation", model=mdl, tokenizer=tok, device=0)
25
 
 
19
  @lru_cache(maxsize=None)
20
  def get_pipeline(model_name):
21
  tok = AutoTokenizer.from_pretrained(model_name)
22
+ mdl = AutoModelForCausalLM.from_pretrained(model_name, weights_only=False, trust_remote_code=True)
23
  mdl.to("cuda")
24
  return pipeline("text-generation", model=mdl, tokenizer=tok, device=0)
25