MCPcopy Create free account
hub / github.com/dhbloo/rapfi / loadModelFromFile

Function loadModelFromFile

Rapfi/command/command.cpp:157–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool loadModelFromFile(std::filesystem::path modelPath)
158{
159 modelPath = getModelFullPath(modelPath);
160 std::ifstream modelFile(modelPath, std::ios::binary);
161
162 if (modelFile.is_open()) {
163 if (Config::loadModel(modelFile))
164 return true;
165 else
166 ERRORL("Failed to load model from ["
167 << modelPath << "]. Please check if model binary file is correct.");
168 }
169 else
170 ERRORL("Unable to open model file: " << modelPath);
171
172 return false;
173}
174
175} // namespace Command

Callers 2

readModelMethod · 0.85
loadModelFunction · 0.85

Calls 2

getModelFullPathFunction · 0.85
loadModelFunction · 0.85

Tested by

no test coverage detected