getModelFolder method

Future<String> getModelFolder({
  1. required String modelId,
  2. required String framework,
})

Get the model folder path, creating it if necessary

Implementation

Future<String> getModelFolder({
  required String modelId,
  required String framework,
}) async {
  _ensureInitialized();
  final folderPath = path.join(
    _baseDirectory!.path,
    'Models',
    framework,
    modelId,
  );
  final folder = Directory(folderPath);
  if (!await folder.exists()) {
    await folder.create(recursive: true);
  }
  return folderPath;
}