Unverified Commit a24221d4 authored by Hyeonki Hong's avatar Hyeonki Hong Committed by GitHub
Browse files

feat: support HF_HOME/_ENDPOINT env for Hugging Face models (#2642)


Signed-off-by: default avatarHyeonki Hong <hhk7734@gmail.com>
parent 225aee52
...@@ -42,7 +42,7 @@ fn is_weight_file(filename: &str) -> bool { ...@@ -42,7 +42,7 @@ fn is_weight_file(filename: &str) -> bool {
pub async fn from_hf(name: impl AsRef<Path>, ignore_weights: bool) -> anyhow::Result<PathBuf> { pub async fn from_hf(name: impl AsRef<Path>, ignore_weights: bool) -> anyhow::Result<PathBuf> {
let name = name.as_ref(); let name = name.as_ref();
let token = env::var(HF_TOKEN_ENV_VAR).ok(); let token = env::var(HF_TOKEN_ENV_VAR).ok();
let api = ApiBuilder::new() let api = ApiBuilder::from_env()
.with_progress(true) .with_progress(true)
.with_token(token) .with_token(token)
.high() .high()
......
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