Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,5 +5,12 @@ import keras
|
|
| 5 |
|
| 6 |
model = keras.models.load_model("model.keras")
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
st.write("### Model Summary:")
|
| 9 |
-
st.text(
|
|
|
|
| 5 |
|
| 6 |
model = keras.models.load_model("model.keras")
|
| 7 |
|
| 8 |
+
old_stdout = sys.stdout # Save the current stdout so we can restore it later
|
| 9 |
+
sys.stdout = StringIO() # Redirect stdout to StringIO object
|
| 10 |
+
model.summary() # This will now be written to the StringIO object
|
| 11 |
+
model_summary = sys.stdout.getvalue() # Get the value from StringIO
|
| 12 |
+
sys.stdout = old_stdout # Restore original stdout
|
| 13 |
+
|
| 14 |
+
# Display model summary using Streamlit
|
| 15 |
st.write("### Model Summary:")
|
| 16 |
+
st.text(model_summary)
|