Skip to content

Commit 10ba8c7

Browse files
eternaphiangxson
andauthored
Update common/arg.cpp
readability Improvement Co-authored-by: Xuan-Son Nguyen <[email protected]>
1 parent 74dd6c8 commit 10ba8c7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common/arg.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,10 @@ static void common_params_handle_model(
656656
}
657657
}
658658

659-
std::string hf_endpoint{"https://huggingface.co/"};
660-
if(auto const* hf_endpoint_env = getenv("HF_ENDPOINT"); hf_endpoint_env) {
661-
hf_endpoint = std::string{hf_endpoint_env};
659+
std::string hf_endpoint = "https://huggingface.co/";
660+
const char * hf_endpoint_env = getenv("HF_ENDPOINT");
661+
if (hf_endpoint_env) {
662+
hf_endpoint = hf_endpoint_env;
662663
if (hf_endpoint.back() != '/') hf_endpoint += '/';
663664
}
664665

0 commit comments

Comments
 (0)