mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
[doc] custom_models: mention security features of the Hub (#15768)
* custom_models: tiny doc addition * mention security feature earlier in the section Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
This commit is contained in:
parent
9e71d46455
commit
32f5de10a0
1 changed files with 3 additions and 2 deletions
|
|
@ -304,8 +304,9 @@ See the [sharing tutorial](model_sharing) for more information on the push to Hu
|
|||
## Using a model with custom code
|
||||
|
||||
You can use any configuration, model or tokenizer with custom code files in its repository with the auto-classes and
|
||||
the `from_pretrained` method. The only thing is that you have to add an extra argument to make sure you have read the
|
||||
online code and trust the author of that model, to avoid executing malicious code on your machine:
|
||||
the `from_pretrained` method. All files and code uploaded to the Hub are scanned for malware (refer to the [Hub security](https://huggingface.co/docs/hub/security#malware-scanning) documentation for more information), but you should still
|
||||
review the model code and author to avoid executing malicious code on your machine. Set `trust_remote_code=True` to use
|
||||
a model with custom code:
|
||||
|
||||
```py
|
||||
from transformers import AutoModelForImageClassification
|
||||
|
|
|
|||
Loading…
Reference in a new issue