Spaces:
Sleeping
Sleeping
nursulu
commited on
Commit
·
6c696fb
1
Parent(s):
a87919e
Add application file
Browse files
app.py
CHANGED
@@ -1,4 +1,17 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
2 |
|
3 |
x = st.slider('Select a value')
|
4 |
-
st.write(x, 'squared is', x * x)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from PIL import Image
|
3 |
+
import io
|
4 |
|
5 |
x = st.slider('Select a value')
|
6 |
+
st.write(x, 'squared is', x * x)
|
7 |
+
|
8 |
+
|
9 |
+
st.title("Image Upload and Processing App")
|
10 |
+
|
11 |
+
# Upload the image
|
12 |
+
uploaded_image = st.file_uploader("Upload an Image", type=["jpg", "png", "jpeg"])
|
13 |
+
|
14 |
+
# Process and display if image is uploaded
|
15 |
+
if uploaded_image is not None:
|
16 |
+
image = Image.open(uploaded_image)
|
17 |
+
st.image(image, caption="Uploaded Image", use_column_width=True)
|