push app
Browse files
app.py
CHANGED
|
@@ -93,12 +93,11 @@ canvas = st.empty()
|
|
| 93 |
# picture = Image.new(mode="RGB", size=(512, 512), color=(153, 153, 255))
|
| 94 |
# Capture image from camera and process it
|
| 95 |
|
| 96 |
-
enable = st.checkbox("Enable camera")
|
| 97 |
-
picture = st.camera_input("Take a picture", disabled=not enable)
|
| 98 |
|
| 99 |
|
| 100 |
if "img" not in st.session_state:
|
| 101 |
-
|
|
|
|
| 102 |
if picture is not None:
|
| 103 |
img = Image.open(picture)
|
| 104 |
img = crop_resize_image(img, target_width=768, target_height=512)
|
|
|
|
| 93 |
# picture = Image.new(mode="RGB", size=(512, 512), color=(153, 153, 255))
|
| 94 |
# Capture image from camera and process it
|
| 95 |
|
|
|
|
|
|
|
| 96 |
|
| 97 |
|
| 98 |
if "img" not in st.session_state:
|
| 99 |
+
enable = st.checkbox("Enable camera")
|
| 100 |
+
picture = st.camera_input("Take a picture", disabled=not enable)
|
| 101 |
if picture is not None:
|
| 102 |
img = Image.open(picture)
|
| 103 |
img = crop_resize_image(img, target_width=768, target_height=512)
|