Skip to content

Commit

Permalink
update from_pretrained.rs file as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Oct 3, 2024
1 parent 4617efe commit 15a36c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tokenizers/src/utils/from_pretrained.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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 {
fn default() -> Self {
Self {
revision: "main".into(),
user_agent: HashMap::new(),
auth_token: None,
token: None,
}
}
}
Expand Down Expand Up @@ -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()?;
Expand Down

0 comments on commit 15a36c3

Please sign in to comment.