Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,14 @@ import matplotlib.pyplot as plt
|
|
| 4 |
from tensorflow import keras
|
| 5 |
from tensorflow.keras import layers
|
| 6 |
from keras.datasets import mnist
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Function to display image, latent representation, and reconstructed image
|
| 10 |
def display_reconstruction(index, autoencoder, encoder, x_test):
|
|
@@ -86,8 +93,3 @@ if st.session_state.autoencoder:
|
|
| 86 |
if st.button("Display Reconstruction"):
|
| 87 |
display_reconstruction(test_index, st.session_state.autoencoder, st.session_state.encoder, st.session_state.x_test)
|
| 88 |
|
| 89 |
-
architecture_image = cv2.imread("image1.png")
|
| 90 |
-
|
| 91 |
-
architecture_image = cv2.cvtColor(architecture_image, cv2.COLOR_BGR2RGB) # Convert to RGB for proper display
|
| 92 |
-
|
| 93 |
-
st.image(architecture_image, caption="Autoencoder Architecture")
|
|
|
|
| 4 |
from tensorflow import keras
|
| 5 |
from tensorflow.keras import layers
|
| 6 |
from keras.datasets import mnist
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
# Streamlit interface
|
| 10 |
+
st.title("Autoencoder Visualization")
|
| 11 |
+
st.subheader("Please train the autoencoder on MNIST train dataset")
|
| 12 |
+
st.subheader("Test and observe decoding below")
|
| 13 |
+
st.subheader("Developed by Dr. Hemprasad Yashwant Patil, SENSE, VIT Vellore")
|
| 14 |
+
|
| 15 |
|
| 16 |
# Function to display image, latent representation, and reconstructed image
|
| 17 |
def display_reconstruction(index, autoencoder, encoder, x_test):
|
|
|
|
| 93 |
if st.button("Display Reconstruction"):
|
| 94 |
display_reconstruction(test_index, st.session_state.autoencoder, st.session_state.encoder, st.session_state.x_test)
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|