createFromAsset static method
Create BertQuestionAnswerer directly from assetPath
.
assetPath
must the full path to assets. Eg. 'assets/my_model.tflite'.
throws FileSystemException If model file fails to load.
Implementation
static Future<BertQuestionAnswerer> createFromAsset(String assetPath) async {
final modelFile = await FileUtil.loadFileOnDevice(assetPath);
return create(modelFile.path);
}