Skip to content

Commit

Permalink
Fix UI issue for image classification (#233)
Browse files Browse the repository at this point in the history
When switch to NPU and choose model directly, it will throw error
as the data type doesn't change correspondingly, fix it by clicking
the correct data type if switch to NPU or CPU.
  • Loading branch information
Honry authored May 8, 2024
1 parent 480ab02 commit 1802c28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions image_classification/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@ $('#backendBtns .btn').on('change', async (e) => {
} else if (deviceType == 'npu') {
ui.handleBtnUI('#float16Label', false);
ui.handleBtnUI('#float32Label', true);
$('#float16').click();
displayAvailableModels(modelList, deviceType, 'float16');
} else {
ui.handleBtnUI('#float16Label', true);
ui.handleBtnUI('#float32Label', false);
$('#float32').click();
displayAvailableModels(modelList, deviceType, 'float32');
}

Expand Down

0 comments on commit 1802c28

Please sign in to comment.