Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,13 +50,20 @@ st.markdown("""
|
|
50 |
col1, col2 = st.columns(2)
|
51 |
|
52 |
# Replace 'Dog.jpg' with the path to an example image if running locally
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
with col2:
|
62 |
st.subheader("Upload Your Image")
|
|
|
50 |
col1, col2 = st.columns(2)
|
51 |
|
52 |
# Replace 'Dog.jpg' with the path to an example image if running locally
|
53 |
+
example_image_path = 'Dog.jpg'
|
54 |
+
example_image = cv2.imread(example_image_path)
|
55 |
|
56 |
+
if example_image is not None:
|
57 |
+
# Convert BGR to RGB for correct color display
|
58 |
+
example_image_rgb = cv2.cvtColor(example_image, cv2.COLOR_BGR2RGB)
|
59 |
+
example_sketch = image_to_sketch(example_image)
|
60 |
+
|
61 |
+
with col1:
|
62 |
+
st.subheader("Example Conversions")
|
63 |
+
st.image(example_image_rgb, caption='Original Image', use_column_width=True)
|
64 |
+
st.image(example_sketch, caption='Sketch Image', use_column_width=True)
|
65 |
+
else:
|
66 |
+
st.error(f"Failed to load example image from path: {example_image_path}")
|
67 |
|
68 |
with col2:
|
69 |
st.subheader("Upload Your Image")
|