rohithk-03 commited on
Commit
537e97c
·
1 Parent(s): a39b793

update model code

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -259,7 +259,7 @@ def predict():
259
  return jsonify({"message": "Not an mri image", "confidence": 0.95, "saved_path": image_save_path})
260
  a, b = model.check_file(temp_path)
261
  image = Image.open(temp_path).convert("RGB")
262
- output = model(transform(image).unsqueeze(0).to(device))
263
  stage = output.item()
264
  if stage <= 2.0:
265
  stage = "Mild"
 
259
  return jsonify({"message": "Not an mri image", "confidence": 0.95, "saved_path": image_save_path})
260
  a, b = model.check_file(temp_path)
261
  image = Image.open(temp_path).convert("RGB")
262
+ output = model(transform(image).unsqueeze(0))
263
  stage = output.item()
264
  if stage <= 2.0:
265
  stage = "Mild"