Currently Java Native Interface is provided.
-
Model file
- Model file is provided by ZETIC.ai with URL. You can simply use the model url.
-
Aar Library
- Zetic MLange :
zeticMLange.aar
- Zetic MLange :
app
└── libs
└── zeticlibs
└── zeticMLange.aar
- build.gradle (Groovy)
android {
...
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
}
dependencies {
implementation files('libs/zeticlibs/zeticMLange.aar')
}
- build.gradle.kts (Kotlin DSL)
android {
...
packaging {
jniLibs {
useLegacyPackaging = true
}
}
}
dependencies {
implementation(files("libs/zeticlibs/zeticMLange.aar"))
}
- Zetic MLange model running (Java)
// 1. Zetic MLange model running
// (1) Prepare model inputs
ByteBuffer[] inputs = // Prepare your inputs;
// (2) Load Zetic MLange model
ZeticMLangeModel model = new ZeticMLangeModel(this, "MLANGE MODEL KEY");
// (3) Run model and get outputs
model.run(inputs);
// (4) Get output buffers
ByteBuffer[] outputs = model.getOutputBuffers();
- Zetic MLange model running (Kotlin)
// 1. Zetic MLange Model Running
// (1) Prepare model inputs
val inputs: Array<ByteBuffer> = // Prepare your inputs
// (2) Load Zetic MLange model
val model = ZeticMLangeModel(this, "MODEL KEY")
// (3) Run model and get outputs
model.run(inputs)
// (4) Get output buffers
val outputs = model.outputBuffers