Spaces:
Sleeping
Sleeping
Update pages/4_π¬_Decision_Exploration_Panel.py
Browse files
pages/4_π¬_Decision_Exploration_Panel.py
CHANGED
@@ -151,7 +151,8 @@ def get_model(model_path):
|
|
151 |
return new_model
|
152 |
|
153 |
@st.cache(allow_output_mutation=True)
|
154 |
-
def get_feature_vector_model(
|
|
|
155 |
feature_extractor = tf.keras.Model(keras_model.inputs,keras_model.layers[-3].output)
|
156 |
return feature_extractor
|
157 |
# feature_mod = get_feature_extractor_model(keras_model)
|
@@ -304,9 +305,9 @@ def main():
|
|
304 |
st.sidebar.warning('\
|
305 |
Please upload SINGLE single...')
|
306 |
st.sidebar.write(" ------ ")
|
307 |
-
st.sidebar.title("Explore the Instance
|
308 |
new_model = get_model(MODEL_PATH)
|
309 |
-
feature_extractor_model = get_feature_vector_model(
|
310 |
|
311 |
app_mode = st.sidebar.selectbox("Please select from the following", SIDEBAR_OPTIONS)
|
312 |
|
|
|
151 |
return new_model
|
152 |
|
153 |
@st.cache(allow_output_mutation=True)
|
154 |
+
def get_feature_vector_model(model_path):
|
155 |
+
keras_model = tf.keras.models.load_model(model_path)
|
156 |
feature_extractor = tf.keras.Model(keras_model.inputs,keras_model.layers[-3].output)
|
157 |
return feature_extractor
|
158 |
# feature_mod = get_feature_extractor_model(keras_model)
|
|
|
305 |
st.sidebar.warning('\
|
306 |
Please upload SINGLE single...')
|
307 |
st.sidebar.write(" ------ ")
|
308 |
+
st.sidebar.title("Explore the Instance Predictions and Explanations")
|
309 |
new_model = get_model(MODEL_PATH)
|
310 |
+
feature_extractor_model = get_feature_vector_model(MODEL_PATH)
|
311 |
|
312 |
app_mode = st.sidebar.selectbox("Please select from the following", SIDEBAR_OPTIONS)
|
313 |
|