Skip to content

Commit 93aa89a

Browse files
committed
feat: support HF_HOME/_ENDPOINT env for huggingface models
1 parent 6a358f7 commit 93aa89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/llm/src/hub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn is_weight_file(filename: &str) -> bool {
4242
pub async fn from_hf(name: impl AsRef<Path>, ignore_weights: bool) -> anyhow::Result<PathBuf> {
4343
let name = name.as_ref();
4444
let token = env::var(HF_TOKEN_ENV_VAR).ok();
45-
let api = ApiBuilder::new()
45+
let api = ApiBuilder::from_env()
4646
.with_progress(true)
4747
.with_token(token)
4848
.high()

0 commit comments

Comments
 (0)