Iammcqwory commited on
Commit
e94709d
·
verified ·
1 Parent(s): 10d7bb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
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
- for project, image_path in projects.items():
27
- st.subheader(project)
28
- try:
29
- st.image(image_path, caption=project, use_column_width=True)
30
- except Exception as e:
31
- st.error(f"Error loading image: {e}")
32
- st.write("Description of the project and its impact.")
 
 
 
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():