Anne314159 commited on
Commit
855d0a5
·
verified ·
1 Parent(s): 86074e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -5
app.py CHANGED
@@ -134,16 +134,54 @@ def page_article_to_social_post():
134
  st.success('Generated Content:')
135
  st.write(post_content)
136
 
137
- def page_test():
138
- st.title('Test Page')
139
- st.write('This is a test page with a test name.')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  # Setup the sidebar with page selection
142
  st.sidebar.title("Anne's Current Projects :star2:")
143
 
144
  page = st.sidebar.selectbox(
145
  'What project do you like to see first?',
146
- ('trending_niche', 'page_article_to_social_post', 'Test Page'))
147
 
148
 
149
  # Display the selected page
@@ -151,6 +189,6 @@ if page == 'trending_niche':
151
  page_trending_niche()
152
  elif page == 'page_article_to_social_post':
153
  page_article_to_social_post()
154
- elif page == 'Test Page':
155
  page_test()
156
 
 
134
  st.success('Generated Content:')
135
  st.write(post_content)
136
 
137
+ def page_vaccation():
138
+ import streamlit as st
139
+ import pandas as pd
140
+ import pydeck as pdk
141
+
142
+ # Input for start and end points
143
+ start_point = st.text_input("Enter start point", "Location A")
144
+ end_point = st.text_input("Enter end point", "Location B")
145
+
146
+ # Assume function to calculate route and places of interest (mock data for demonstration)
147
+ # You would replace this with real data obtained from mapping APIs
148
+ route_data = pd.DataFrame({
149
+ 'lat': [start_lat, end_lat],
150
+ 'lon': [start_lon, end_lon]
151
+ })
152
+ places_of_interest = pd.DataFrame({
153
+ 'lat': [poi1_lat, poi2_lat], # Latitudes of places of interest
154
+ 'lon': [poi1_lon, poi2_lon], # Longitudes of places of interest
155
+ 'name': ['Place 1', 'Place 2'] # Names of places of interest
156
+ })
157
+
158
+ # Display the map
159
+ st.pydeck_chart(pdk.Deck(
160
+ map_style='mapbox://styles/mapbox/light-v9',
161
+ initial_view_state=pdk.ViewState(
162
+ latitude=route_data['lat'].mean(),
163
+ longitude=route_data['lon'].mean(),
164
+ zoom=11,
165
+ pitch=50,
166
+ ),
167
+ layers=[
168
+ pdk.Layer(
169
+ 'ScatterplotLayer',
170
+ data=places_of_interest,
171
+ get_position='[lon, lat]',
172
+ get_color='[200, 30, 0, 160]',
173
+ get_radius=200,
174
+ ),
175
+ ],
176
+ ))
177
+
178
 
179
  # Setup the sidebar with page selection
180
  st.sidebar.title("Anne's Current Projects :star2:")
181
 
182
  page = st.sidebar.selectbox(
183
  'What project do you like to see first?',
184
+ ('trending_niche', 'page_article_to_social_post', 'Vaccation Page'))
185
 
186
 
187
  # Display the selected page
 
189
  page_trending_niche()
190
  elif page == 'page_article_to_social_post':
191
  page_article_to_social_post()
192
+ elif page == 'Vaccation Page':
193
  page_test()
194