Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ import cv2
|
|
| 14 |
model = load_model('Densenet.h5')
|
| 15 |
model.load_weights("pretrained_model.h5")
|
| 16 |
layer_name = 'conv5_block16_concat'
|
| 17 |
-
class_names = ['Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation']
|
| 18 |
def get_gradcam(model, img, layer_name):
|
| 19 |
|
| 20 |
img_array = img_to_array(img)
|
|
@@ -80,9 +80,9 @@ iface = gr.Interface(
|
|
| 80 |
inputs="image",
|
| 81 |
outputs=["text", "image"], # Add an "image" output for the overlayed image
|
| 82 |
title="Xray Classification - KIMS",
|
| 83 |
-
description="Classify cxr into 'Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation'. Built by Dr Sai and Dr Ajavindu"
|
| 84 |
)
|
| 85 |
|
| 86 |
|
| 87 |
-
# Launch the interface
|
| 88 |
iface.launch( )
|
|
|
|
| 14 |
model = load_model('Densenet.h5')
|
| 15 |
model.load_weights("pretrained_model.h5")
|
| 16 |
layer_name = 'conv5_block16_concat'
|
| 17 |
+
class_names = ['Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation', 'No Finding']
|
| 18 |
def get_gradcam(model, img, layer_name):
|
| 19 |
|
| 20 |
img_array = img_to_array(img)
|
|
|
|
| 80 |
inputs="image",
|
| 81 |
outputs=["text", "image"], # Add an "image" output for the overlayed image
|
| 82 |
title="Xray Classification - KIMS",
|
| 83 |
+
description="Classify cxr into 'Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation', No Finding. Built by Dr Sai and Dr Ajavindu"
|
| 84 |
)
|
| 85 |
|
| 86 |
|
| 87 |
+
# Launch the interface,
|
| 88 |
iface.launch( )
|