Kalbe-x-Bangkit
commited on
Commit
•
a647110
1
Parent(s):
3343b08
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ enhancement_type = st.sidebar.selectbox(
|
|
36 |
H = 224
|
37 |
W = 224
|
38 |
|
|
|
39 |
def load_model():
|
40 |
model = tf.keras.models.load_model("model-detection.h5", compile=False)
|
41 |
model.compile(
|
@@ -74,7 +75,7 @@ model = load_model()
|
|
74 |
|
75 |
# st.image(image, caption='Uploaded Image.', use_column_width=True)
|
76 |
|
77 |
-
|
78 |
def load_gradcam_model():
|
79 |
model = keras.models.load_model('./model_renamed.h5')
|
80 |
return model
|
|
|
36 |
H = 224
|
37 |
W = 224
|
38 |
|
39 |
+
@st.cache_resource
|
40 |
def load_model():
|
41 |
model = tf.keras.models.load_model("model-detection.h5", compile=False)
|
42 |
model.compile(
|
|
|
75 |
|
76 |
# st.image(image, caption='Uploaded Image.', use_column_width=True)
|
77 |
|
78 |
+
@st.cache_resource
|
79 |
def load_gradcam_model():
|
80 |
model = keras.models.load_model('./model_renamed.h5')
|
81 |
return model
|