Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -2
src/streamlit_app.py
CHANGED
|
@@ -31,7 +31,7 @@ class RepVGGBlock(layers.Layer):
|
|
| 31 |
self.actual_in_channels = None
|
| 32 |
|
| 33 |
self.rbr_dense_conv = layers.Conv2D(
|
| 34 |
-
filters=self.
|
| 35 |
strides=self.config_strides_val, padding='same',
|
| 36 |
groups=self.config_groups, use_bias=False, name=self.name + '_dense_conv'
|
| 37 |
)
|
|
@@ -248,7 +248,8 @@ IMG_HEIGHT = 299
|
|
| 248 |
st.set_page_config(page_title="Genera Cloud Classifier", layout="wide")
|
| 249 |
|
| 250 |
# --- Load Model and Label Mapping (Cached for performance) ---
|
| 251 |
-
@st.
|
|
|
|
| 252 |
"""Loads the Keras model with custom layer definitions."""
|
| 253 |
if not os.path.exists(model_path):
|
| 254 |
st.error(f"Model file not found: {model_path}")
|
|
|
|
| 31 |
self.actual_in_channels = None
|
| 32 |
|
| 33 |
self.rbr_dense_conv = layers.Conv2D(
|
| 34 |
+
filters=self.config_out_out_channels, kernel_size=self.config_kernel_size,
|
| 35 |
strides=self.config_strides_val, padding='same',
|
| 36 |
groups=self.config_groups, use_bias=False, name=self.name + '_dense_conv'
|
| 37 |
)
|
|
|
|
| 248 |
st.set_page_config(page_title="Genera Cloud Classifier", layout="wide")
|
| 249 |
|
| 250 |
# --- Load Model and Label Mapping (Cached for performance) ---
|
| 251 |
+
@st.cache_resource # Added newline here
|
| 252 |
+
def load_keras_model(model_path):
|
| 253 |
"""Loads the Keras model with custom layer definitions."""
|
| 254 |
if not os.path.exists(model_path):
|
| 255 |
st.error(f"Model file not found: {model_path}")
|