Unverified Commit 32f5de10 authored by Julien Chaumond's avatar Julien Chaumond Committed by GitHub
Browse files

[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: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
parent 9e71d464
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment