Spaces:
Sleeping
Sleeping
sync with remote
Browse files
app.py
CHANGED
|
@@ -198,18 +198,18 @@ model.summary(print_fn=lambda x: model_summary.write(x + '\n'))
|
|
| 198 |
# Display the model summary in Streamlit
|
| 199 |
st.markdown(model_summary.getvalue())
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
# Streamlit App
|
| 206 |
st.title("Model Architecture")
|
| 207 |
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
st.image(plot_filename, caption="Neural Network Architecture", use_container_width=True)
|
| 211 |
-
except Exception as e:
|
| 212 |
-
st.error(f"An error occurred: {e}")
|
| 213 |
|
| 214 |
# show a predection, as an example
|
| 215 |
show_predictions(test_dataset)
|
|
|
|
| 198 |
# Display the model summary in Streamlit
|
| 199 |
st.markdown(model_summary.getvalue())
|
| 200 |
|
| 201 |
+
try:
|
| 202 |
+
# Save the model plot
|
| 203 |
+
plot_filename = "model_plot.png"
|
| 204 |
+
tf.keras.utils.plot_model(model, to_file=plot_filename, show_shapes=True)
|
| 205 |
+
except Exception as e:
|
| 206 |
+
st.error(f"An error occurred: {e}")
|
| 207 |
|
| 208 |
# Streamlit App
|
| 209 |
st.title("Model Architecture")
|
| 210 |
|
| 211 |
+
# Display the model plot
|
| 212 |
+
st.image(plot_filename, caption="Neural Network Architecture", use_container_width=True)
|
|
|
|
|
|
|
|
|
|
| 213 |
|
| 214 |
# show a predection, as an example
|
| 215 |
show_predictions(test_dataset)
|