Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,16 @@ def project_gallery():
|
|
23 |
"Community Center Upgrade": "community_center_image.jpg" # Ensure this path is correct
|
24 |
}
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
|
34 |
# Educational Resources Content
|
35 |
def educational_resources():
|
|
|
23 |
"Community Center Upgrade": "community_center_image.jpg" # Ensure this path is correct
|
24 |
}
|
25 |
|
26 |
+
# Create a grid layout for the gallery
|
27 |
+
cols = st.columns(3) # Adjust the number of columns as needed
|
28 |
+
for idx, (project, image_path) in enumerate(projects.items()):
|
29 |
+
with cols[idx % 3]: # Cycle through columns
|
30 |
+
st.subheader(project)
|
31 |
+
try:
|
32 |
+
st.image(image_path, caption=project, use_container_width=True)
|
33 |
+
except Exception as e:
|
34 |
+
st.error(f"Error loading image: {e}")
|
35 |
+
st.write("Description of the project and its impact.")
|
36 |
|
37 |
# Educational Resources Content
|
38 |
def educational_resources():
|