Formatting

This commit is contained in:
ozanarmagan 2023-03-19 02:17:56 +03:00
parent c71b0574e9
commit a4b652da7b

View File

@ -100,20 +100,20 @@ public:
inline static void download_default_model() {
HttpClient& httpClient = HttpClient::get_instance();
if(!check_md5(get_absolute_model_path(DEFAULT_MODEL_NAME), DEFAULT_MODEL_MD5)) {
LOG(INFO) << "Downloading default model";
long res = httpClient.download_file(DEFAULT_MODEL_URL, get_absolute_model_path(DEFAULT_MODEL_NAME));
if(res != 200) {
LOG(INFO) << "Failed to download default model: " << res;
LOG(INFO) << "Downloading default model";
long res = httpClient.download_file(DEFAULT_MODEL_URL, get_absolute_model_path(DEFAULT_MODEL_NAME));
if(res != 200) {
LOG(INFO) << "Failed to download default model: " << res;
}
}
}
if(!check_md5(get_absolute_vocab_path(), DEFAULT_VOCAB_MD5)) {
LOG(INFO) << "Downloading default vocab";
long res = httpClient.download_file(DEFAULT_VOCAB_URL, get_absolute_vocab_path());
if(res != 200) {
LOG(INFO) << "Failed to download default vocab: " << res;
if(!check_md5(get_absolute_vocab_path(), DEFAULT_VOCAB_MD5)) {
LOG(INFO) << "Downloading default vocab";
long res = httpClient.download_file(DEFAULT_VOCAB_URL, get_absolute_vocab_path());
if(res != 200) {
LOG(INFO) << "Failed to download default vocab: " << res;
}
}
}
}
private:
TextEmbedderManager() = default;
std::unordered_map<std::string, TextEmbedder*> text_embedders;