rohithk-03 commited on
Commit
95e893d
·
1 Parent(s): a64384c

update model code

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. test.py +1 -1
app.py CHANGED
@@ -247,7 +247,7 @@ def predict():
247
  print(edge_density)
248
  return edge_density > 0.05
249
 
250
- if (not is_mri_image(temp_path)):
251
  return jsonify({"message": "Not an mri image", "confidence": 0.95, "saved_path": image_save_path})
252
  a, b = model.check_file(temp_path)
253
  return jsonify({"message": a, "confidence": b, "saved_path": image_save_path})
 
247
  print(edge_density)
248
  return edge_density > 0.05
249
 
250
+ if (is_mri_image(temp_path)):
251
  return jsonify({"message": "Not an mri image", "confidence": 0.95, "saved_path": image_save_path})
252
  a, b = model.check_file(temp_path)
253
  return jsonify({"message": a, "confidence": b, "saved_path": image_save_path})
test.py CHANGED
@@ -18,4 +18,4 @@ def is_mri_image(image_path):
18
 
19
 
20
  # Test on an MRI or non-MRI image
21
- print(is_mri_image("download.jpeg"))
 
18
 
19
 
20
  # Test on an MRI or non-MRI image
21
+ print(is_mri_image("a.png"))