Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,26 +38,19 @@ st.title("St. Louis Area Neighborhood Matchmaker")
|
|
| 38 |
st.write("This tool helps you find neighborhoods in Saint Louis, Missouri, and surrounding areas based on your lifestyle preferences.")
|
| 39 |
|
| 40 |
# Using columns to organize the layout
|
| 41 |
-
col1, col2
|
| 42 |
|
| 43 |
with col1:
|
| 44 |
-
# Checkboxes for amenities
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
amenities_list_col2 = ["Gyms", "Cafes", "Pet-friendly Areas", "Cultural Attractions", "Quiet Neighborhoods"]
|
| 51 |
-
amenities_col2 = [amenity for amenity in amenities_list_col2 if st.checkbox(amenity)]
|
| 52 |
-
|
| 53 |
-
# Combine amenities from both columns
|
| 54 |
-
amenities = amenities_col1 + amenities_col2
|
| 55 |
-
amenities_proximity = st.selectbox("Proximity to Amenities", ["Walking distance", "A short drive away", "I don't mind being far from amenities"])
|
| 56 |
-
additional_details = st.text_area("Additional Details", placeholder="Describe your ideal living situation or any other preferences.")
|
| 57 |
|
| 58 |
submit_button = st.button('Find Neighborhood')
|
| 59 |
|
| 60 |
-
with
|
| 61 |
# Placeholder for the result
|
| 62 |
result_placeholder = st.empty()
|
| 63 |
if submit_button:
|
|
|
|
| 38 |
st.write("This tool helps you find neighborhoods in Saint Louis, Missouri, and surrounding areas based on your lifestyle preferences.")
|
| 39 |
|
| 40 |
# Using columns to organize the layout
|
| 41 |
+
col1, col2 = st.columns([2, 2])
|
| 42 |
|
| 43 |
with col1:
|
| 44 |
+
# Checkboxes for amenities in two columns within col1
|
| 45 |
+
amenities_list = ["Good Schools", "Parks", "Shopping Centers", "Public Transport", "Restaurants", "Gyms", "Cafes", "Pet-friendly Areas", "Cultural Attractions", "Quiet Neighborhoods"]
|
| 46 |
+
amenities = [amenity for amenity in amenities_list if st.checkbox(amenity)]
|
| 47 |
|
| 48 |
+
amenities_proximity = st.selectbox("Proximity to Amenities", ["Walking distance", "A short drive away", "I don't mind being far from amenities"], key="proximity")
|
| 49 |
+
additional_details = st.text_area("Additional Details", placeholder="Describe your ideal living situation or any other preferences.", key="details")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
submit_button = st.button('Find Neighborhood')
|
| 52 |
|
| 53 |
+
with col2:
|
| 54 |
# Placeholder for the result
|
| 55 |
result_placeholder = st.empty()
|
| 56 |
if submit_button:
|