AmirV97 commited on
Commit
96f73e3
·
1 Parent(s): d6e3eaf
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -36,11 +36,11 @@ model.eval()
36
 
37
  def inference(img_dir):
38
  image = np.array(Image.open(str(img_dir)).convert('L'))
39
- image = transforms(image=image)['image']
40
- with torch.inference_mode():
41
  out = model(image).item()
42
- out = out > 0
43
- return "Fracture +" if out else "Fracture -"
44
 
45
  examples = ["NF1.jpg", "NF2.jpg", "NF3.jpg", "F1.jpg", "F2.jpg", "F3.jpg"]
46
 
 
36
 
37
  def inference(img_dir):
38
  image = np.array(Image.open(str(img_dir)).convert('L'))
39
+ image = transforms(image=image)['image']
40
+ with torch.inference_mode():
41
  out = model(image).item()
42
+ out = out > 0
43
+ return "Fracture +" if out else "Fracture -"
44
 
45
  examples = ["NF1.jpg", "NF2.jpg", "NF3.jpg", "F1.jpg", "F2.jpg", "F3.jpg"]
46