kumar989 commited on
Commit
09986f2
·
1 Parent(s): 663894d

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +3 -6
model.py CHANGED
@@ -31,14 +31,11 @@ def classify(img):
31
 
32
  def bone_net(img):
33
  # img = cv2.resize(img,(224,224))
 
34
  model = tf.keras.models.load_model("fracture.h5",compile=False)
35
  result = model.predict(np.array([img]))
36
- op=""
37
- if result[0]<0.5:
38
- op="Fracture"
39
- else:
40
- op="Normal"
41
- return op
42
 
43
  def brain_net(img):
44
  lt = ['pituitary', 'notumor', 'meningioma', 'glioma']
 
31
 
32
  def bone_net(img):
33
  # img = cv2.resize(img,(224,224))
34
+ lt = ["Normal",'Fractured']
35
  model = tf.keras.models.load_model("fracture.h5",compile=False)
36
  result = model.predict(np.array([img]))
37
+ ans = np.argmax(result)
38
+ return lt[ans]
 
 
 
 
39
 
40
  def brain_net(img):
41
  lt = ['pituitary', 'notumor', 'meningioma', 'glioma']