Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
fix(plugin): remove tensorflow engine
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Oct 3, 2024
1 parent 53e6758 commit c6dd5cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ dependencies {
implementation("org.apache.commons:commons-lang3:3.16.0")
implementation("org.apache.commons:commons-imaging:1.0-alpha1")
implementation("ai.djl.onnxruntime:onnxruntime-engine:0.23.0")
implementation(platform("ai.djl:bom:0.23.0"))
implementation("ai.djl.tensorflow:tensorflow-engine:0.23.0")
implementation("ai.djl.tensorflow:tensorflow-model-zoo:0.23.0")
implementation("ai.djl.tensorflow:tensorflow-native-cpu:2.10.0:win-x86_64")
implementation("ai.djl.tensorflow:tensorflow-native-cpu:2.10.0:linux-x86_64")

compileOnly("top.mrxiaom.mirai:overflow-core-api:$overflow_version")
compileOnly("top.mrxiaom.mirai:overflow-core:$overflow_version")
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/ltd/guimc/dlm/DLModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ai.djl.MalformedModelException;
import ai.djl.Model;
import ai.djl.engine.Engine;
import ai.djl.inference.Predictor;
import ai.djl.modality.Classifications;
import ai.djl.modality.cv.Image;
Expand All @@ -22,6 +23,7 @@ public class DLModel {
private static boolean inited = false;

public static void init() {
System.out.println("Available engines: " + Engine.getAllEngines());
try {
// 从资源文件中获取模型
InputStream modelStream = DLModel.class.getResourceAsStream("/Nailong.onnx");
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/Test.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import ltd.guimc.dlm.DLModel;

public class Test {
public static void main(String[] args) throws InterruptedException {
DLModel.init();
}
}

0 comments on commit c6dd5cb

Please sign in to comment.