Rathapoom commited on
Commit
b92b8d3
·
1 Parent(s): b18cea1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,12 +10,12 @@ def obj(input_img):
10
  model = project.version(1).model
11
 
12
  #save to .jpg
13
- # img = Image.fromarray(input_img, "RGB")
14
- # img.save("image_filename.jpg")
15
- # image_save_test = 'image_filename.jpg'
16
 
17
  #predict
18
- obj_result = model.predict(input_img, confidence=40, overlap=30).json()['predictions'][0]['class']
19
  if obj_result == "Low Bone":
20
  obj_result = "Osteopenia"
21
 
 
10
  model = project.version(1).model
11
 
12
  #save to .jpg
13
+ img = Image.fromarray(input_img, "RGB")
14
+ img.save("image_filename.jpg")
15
+ image_save_test = 'image_filename.jpg'
16
 
17
  #predict
18
+ obj_result = model.predict(image_save_test, confidence=40, overlap=30).json()['predictions'][0]['class']
19
  if obj_result == "Low Bone":
20
  obj_result = "Osteopenia"
21