mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 08:15:49 +00:00
Use ApiBuilder::from_env() in from_pretrained function (#1737)
Use ApiBuilder::from_env() for builder initialization Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
This commit is contained in:
@ -57,7 +57,7 @@ pub fn from_pretrained<S: AsRef<str>>(
|
||||
.into());
|
||||
}
|
||||
|
||||
let mut builder = ApiBuilder::new();
|
||||
let mut builder = ApiBuilder::from_env();
|
||||
if let Some(token) = params.token {
|
||||
builder = builder.with_token(Some(token));
|
||||
}
|
||||
|
Reference in New Issue
Block a user