mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
Arg name correction: auth_token -> token (#1621)
* Arg name correction: auth_token -> token * Arg name correction in .rs: auth_token -> token * update from_pretrained.rs file as well --------- Co-authored-by: Rene Ravenel <rene@Renes-MacBook-Pro.local> Co-authored-by: Arthur Zucker <arthur.zucker@gmail.com>
This commit is contained in:
@ -8,7 +8,7 @@ use std::path::PathBuf;
|
||||
pub struct FromPretrainedParameters {
|
||||
pub revision: String,
|
||||
pub user_agent: HashMap<String, String>,
|
||||
pub auth_token: Option<String>,
|
||||
pub token: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for FromPretrainedParameters {
|
||||
@ -16,7 +16,7 @@ impl Default for FromPretrainedParameters {
|
||||
Self {
|
||||
revision: "main".into(),
|
||||
user_agent: HashMap::new(),
|
||||
auth_token: None,
|
||||
token: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,7 +60,7 @@ pub fn from_pretrained<S: AsRef<str>>(
|
||||
}
|
||||
|
||||
let mut builder = ApiBuilder::new();
|
||||
if let Some(token) = params.auth_token {
|
||||
if let Some(token) = params.token {
|
||||
builder = builder.with_token(Some(token));
|
||||
}
|
||||
let api = builder.build()?;
|
||||
|
Reference in New Issue
Block a user