Update src/app.py
Browse files- src/app.py +5 -0
src/app.py
CHANGED
@@ -63,6 +63,11 @@ uploaded_images = {}
|
|
63 |
for col, direction in zip(cols, directions):
|
64 |
with col:
|
65 |
uploaded_images[direction] = st.file_uploader(f"{direction}", type=["jpg", "png"], key=direction)
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# --- Process Once All Images Are Uploaded ---
|
68 |
if all(uploaded_images.values()):
|
|
|
63 |
for col, direction in zip(cols, directions):
|
64 |
with col:
|
65 |
uploaded_images[direction] = st.file_uploader(f"{direction}", type=["jpg", "png"], key=direction)
|
66 |
+
if uploaded_file is not None:
|
67 |
+
save_path = os.path.join("/tmp", uploaded_file.name)
|
68 |
+
with open(save_path, "wb") as f:
|
69 |
+
f.write(uploaded_file.getbuffer())
|
70 |
+
st.success(f"File uploaded to {save_path}")
|
71 |
|
72 |
# --- Process Once All Images Are Uploaded ---
|
73 |
if all(uploaded_images.values()):
|