Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
2 |
model.load_weights("pretrained_model.h5")
|
3 |
class_names = ['Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation']
|
4 |
-
def custom_decode_predictions(predictions,
|
5 |
|
6 |
decoded_predictions = []
|
7 |
for pred in predictions:
|
|
|
1 |
+
import tensorflow as tf
|
2 |
+
from tensorflow.keras.models import Model
|
3 |
+
from keras.models import load_model
|
4 |
+
import numpy as np
|
5 |
+
model = load_model('densenet.h5')
|
6 |
model.load_weights("pretrained_model.h5")
|
7 |
class_names = ['Cardiomegaly', 'Emphysema', 'Effusion', 'Hernia', 'Infiltration', 'Mass', 'Nodule', 'Atelectasis', 'Pneumothorax', 'Pleural_Thickening', 'Pneumonia', 'Fibrosis', 'Edema', 'Consolidation']
|
8 |
+
def custom_decode_predictions(predictions, class_lables):
|
9 |
|
10 |
decoded_predictions = []
|
11 |
for pred in predictions:
|