gsarti commited on
Commit
8cbce46
β€’
1 Parent(s): 627d82f

Add trust_remote_code

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,8 +80,8 @@ def pecore(
80
  loaded_model = HuggingfaceModel.load(
81
  model_name_or_path,
82
  attribution_method,
83
- model_kwargs={**json.loads(model_kwargs), **{"token": os.environ["HF_TOKEN"]}},
84
- tokenizer_kwargs={**json.loads(tokenizer_kwargs), **{"token": os.environ["HF_TOKEN"]}},
85
  )
86
  if loaded_model.tokenizer.pad_token is None:
87
  loaded_model.tokenizer.add_special_tokens({"pad_token": "[PAD]"})
 
80
  loaded_model = HuggingfaceModel.load(
81
  model_name_or_path,
82
  attribution_method,
83
+ model_kwargs={**json.loads(model_kwargs), **{"token": os.environ["HF_TOKEN"], "trust_remote_code": True}},
84
+ tokenizer_kwargs={**json.loads(tokenizer_kwargs), **{"token": os.environ["HF_TOKEN"], "trust_remote_code": True}},
85
  )
86
  if loaded_model.tokenizer.pad_token is None:
87
  loaded_model.tokenizer.add_special_tokens({"pad_token": "[PAD]"})