Spaces:
Sleeping
Sleeping
Update model.py
Browse files
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 |
-
|
37 |
-
|
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']
|