Update app.py
Browse files
app.py
CHANGED
@@ -36,5 +36,9 @@ if uploaded_file is not None:
|
|
36 |
# Compress the image using Truncated SVD
|
37 |
compressed_image = truncated_svd_compress(resized_image, k)
|
38 |
|
|
|
|
|
|
|
|
|
39 |
# Display original and compressed images
|
40 |
-
st.image([
|
|
|
36 |
# Compress the image using Truncated SVD
|
37 |
compressed_image = truncated_svd_compress(resized_image, k)
|
38 |
|
39 |
+
# Normalize the images for display
|
40 |
+
gray_image_display = (resized_image - resized_image.min()) / (resized_image.max() - resized_image.min())
|
41 |
+
compressed_image_display = (compressed_image - compressed_image.min()) / (compressed_image.max() - compressed_image.min())
|
42 |
+
|
43 |
# Display original and compressed images
|
44 |
+
st.image([gray_image_display, compressed_image_display], caption=["Original", "Compressed"], use_column_width=True)
|