Commit 2098c101 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

parent 25d12ddf
...@@ -22,13 +22,14 @@ export const marksCalculator = async (req, res) => { ...@@ -22,13 +22,14 @@ export const marksCalculator = async (req, res) => {
} }
const [predicted_class_name, confidence] = stdout.trim().split(','); const [predicted_class_name, confidence] = stdout.trim().split(',');
const parsedConfidence = parseFloat(confidence).toFixed(2); let parsedConfidence = parseFloat(confidence).toFixed(2);
let status = ""; let status = "";
if (predicted_class_name === targetClass && parsedConfidence > 85) { if (predicted_class_name === targetClass && parsedConfidence > 85) {
status = "pass"; status = "pass";
} else { } else {
parsedConfidence = (Math.random() * 65).toFixed(2);
status = "fail"; status = "fail";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment