Skip to content

Commit

Permalink
correct bug
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 17, 2023
1 parent 438d028 commit 61444a0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/io/bioimage/modelrunner/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,11 @@ public static Model createBioimageioModel(String bmzModelFolder, String enginesF
EngineInfo info = null;
for (WeightFormat ww : modelWeights) {
String source = ww.getSourceFileName();
if (!(new File(bmzModelFolder, source.substring(source.lastIndexOf("/")) )).isFile())
if (!(new File(bmzModelFolder, source )).isFile())
continue;
info = EngineInfo.defineCompatibleDLEngineWithRdfYamlWeights(ww, enginesFolder);
if (info != null) {
modelSource = new File(bmzModelFolder,
source.substring(source.lastIndexOf("/"))).getAbsolutePath();
modelSource = new File(bmzModelFolder, source).getAbsolutePath();
break;
}
}
Expand Down Expand Up @@ -350,12 +349,11 @@ public static Model createBioimageioModelWithExactWeigths(String bmzModelFolder,
EngineInfo info = null;
for (WeightFormat ww : modelWeights) {
String source = ww.getSourceFileName();
if (!(new File(bmzModelFolder, source.substring(source.lastIndexOf("/")) )).isFile())
if (!(new File(bmzModelFolder, source )).isFile())
continue;
info = EngineInfo.defineExactDLEngineWithRdfYamlWeights(ww, enginesFolder);
if (info != null) {
modelSource = new File(bmzModelFolder,
source.substring(source.lastIndexOf("/"))).getAbsolutePath();
modelSource = new File(bmzModelFolder, source).getAbsolutePath();
break;
}
}
Expand Down

0 comments on commit 61444a0

Please sign in to comment.