Skip to content
Snippets Groups Projects
Commit 50a90c45 authored by deep1401's avatar deep1401
Browse files

Add local path as well when checking if a model exists locally

parent 175a998a
Branches fix/train-trained-models
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ export default function LoRATrainingRunButton({
});
let modelInLocalList = false;
models_downloaded.forEach(modelData => {
if (modelData.model_id == model) {
if (modelData.model_id == model || modelData.local_path === model) {
modelInLocalList = true;
}
});
......@@ -85,7 +85,7 @@ export default function LoRATrainingRunButton({
datasetInLocalList = true;
}
});
if(modelInLocalList && datasetInLocalList){
// Use fetch API to call endpoint
await fetch(
......@@ -108,6 +108,7 @@ export default function LoRATrainingRunButton({
if (!datasetInLocalList) {
msg += "\n- Dataset: " + dataset;
}
if (!modelInLocalList) {
msg += "\n- Model: " + model;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment