File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,12 @@ pub fn download_artifacts(
133133) -> Result < ( PathBuf , Option < Vec < String > > ) > {
134134 let mut builder = ApiBuilder :: from_env ( ) . with_progress ( false ) ;
135135
136- if let Some ( cache_dir ) = std:: env:: var_os ( "HUGGINGFACE_HUB_CACHE ") {
137- builder = builder. with_cache_dir ( cache_dir . into ( ) ) ;
136+ if let Ok ( token ) = std:: env:: var ( "HF_TOKEN ") {
137+ builder = builder. with_token ( Some ( token ) ) ;
138138 }
139139
140- if let Ok ( origin ) = std:: env:: var ( "HF_HUB_USER_AGENT_ORIGIN ") {
141- builder = builder. with_user_agent ( "origin" , origin . as_str ( ) ) ;
140+ if let Some ( cache_dir ) = std:: env:: var_os ( "HUGGINGFACE_HUB_CACHE ") {
141+ builder = builder. with_cache_dir ( cache_dir . into ( ) ) ;
142142 }
143143
144144 let api = builder. build ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments