Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,18 +12,18 @@ uploaded_file = st.file_uploader("Choose an image", type=["jpg", "jpeg", "png"])
|
|
| 12 |
if uploaded_file:
|
| 13 |
# Load the image
|
| 14 |
image = Image.open(uploaded_file)
|
| 15 |
-
st.image(image, caption="Original Image",
|
| 16 |
|
| 17 |
# Grayscale filter
|
| 18 |
if st.checkbox("Apply Grayscale"):
|
| 19 |
image = ImageOps.grayscale(image)
|
| 20 |
-
st.image(image, caption="Grayscale Image",
|
| 21 |
|
| 22 |
# Brightness adjustment
|
| 23 |
brightness = st.slider("Adjust Brightness", 0.5, 3.0, 1.0, step=0.1)
|
| 24 |
enhancer = ImageEnhance.Brightness(image)
|
| 25 |
image = enhancer.enhance(brightness)
|
| 26 |
-
st.image(image, caption="Brightness Adjusted Image",
|
| 27 |
|
| 28 |
# Download the edited image
|
| 29 |
buf = io.BytesIO()
|
|
|
|
| 12 |
if uploaded_file:
|
| 13 |
# Load the image
|
| 14 |
image = Image.open(uploaded_file)
|
| 15 |
+
st.image(image, caption="Original Image", use_container_width=True)
|
| 16 |
|
| 17 |
# Grayscale filter
|
| 18 |
if st.checkbox("Apply Grayscale"):
|
| 19 |
image = ImageOps.grayscale(image)
|
| 20 |
+
st.image(image, caption="Grayscale Image", use_container_width=True)
|
| 21 |
|
| 22 |
# Brightness adjustment
|
| 23 |
brightness = st.slider("Adjust Brightness", 0.5, 3.0, 1.0, step=0.1)
|
| 24 |
enhancer = ImageEnhance.Brightness(image)
|
| 25 |
image = enhancer.enhance(brightness)
|
| 26 |
+
st.image(image, caption="Brightness Adjusted Image", use_container_width=True)
|
| 27 |
|
| 28 |
# Download the edited image
|
| 29 |
buf = io.BytesIO()
|