Spaces:
Sleeping
Sleeping
Commit
·
c376da9
1
Parent(s):
275de4b
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
|
4 |
# Create a file uploader widget
|
@@ -6,6 +7,13 @@ file = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
|
6 |
|
7 |
# Display the uploaded image
|
8 |
if file is not None:
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
|
|
|
|
|
|
11 |
|
|
|
1 |
import streamlit as st
|
2 |
+
from PIL import Image
|
3 |
|
4 |
|
5 |
# Create a file uploader widget
|
|
|
7 |
|
8 |
# Display the uploaded image
|
9 |
if file is not None:
|
10 |
+
|
11 |
+
# Read the image data
|
12 |
+
image = Image.open(file)
|
13 |
+
|
14 |
+
# Display the image
|
15 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
16 |
+
|
17 |
+
# Print the shape of the image
|
18 |
+
st.write(f"Image shape: {image.size}")
|
19 |
|