mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +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());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut builder = ApiBuilder::new();
|
let mut builder = ApiBuilder::from_env();
|
||||||
if let Some(token) = params.token {
|
if let Some(token) = params.token {
|
||||||
builder = builder.with_token(Some(token));
|
builder = builder.with_token(Some(token));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user