Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -81,5 +81,28 @@ with col2:
|
|
81 |
price_placeholder = st.empty()
|
82 |
price_placeholder.subheader(f'Predicted Price: ${predicted_price[0][0]:,.2f}')
|
83 |
map_data = pd.DataFrame(cities_geo[city])
|
84 |
-
with st.container(height=800, border=True):
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
price_placeholder = st.empty()
|
82 |
price_placeholder.subheader(f'Predicted Price: ${predicted_price[0][0]:,.2f}')
|
83 |
map_data = pd.DataFrame(cities_geo[city])
|
84 |
+
# with st.container(height=800, border=True):
|
85 |
+
# st.map(map_data, zoom=11)
|
86 |
+
|
87 |
+
# Define a PyDeck Layer with map_data
|
88 |
+
layer = pdk.Layer(
|
89 |
+
"ScatterplotLayer",
|
90 |
+
map_data,
|
91 |
+
get_position="[lon, lat]",
|
92 |
+
get_color="[200, 30, 0, 160]",
|
93 |
+
get_radius=200,
|
94 |
+
)
|
95 |
+
|
96 |
+
# Define a PyDeck View (you can adjust height here)
|
97 |
+
view_state = pdk.ViewState(
|
98 |
+
latitude=map_data['lat'].mean(),
|
99 |
+
longitude=map_data['lon'].mean(),
|
100 |
+
zoom=11,
|
101 |
+
pitch=50,
|
102 |
+
)
|
103 |
+
|
104 |
+
# Create a PyDeck chart with the defined layer and view
|
105 |
+
deck = pdk.Deck(layers=[layer], initial_view_state=view_state, height=800)
|
106 |
+
|
107 |
+
# Display the map using st.pydeck_chart
|
108 |
+
st.pydeck_chart(deck)
|