ritwikbiswas commited on
Commit
6d83727
β€’
1 Parent(s): 1c28650

tabbed format

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -34,20 +34,24 @@ if generate_button:
34
 
35
  #openai request
36
  activity_list =','.join(activities)
37
- st.write(f'Plan a trip day by day with the given parameters, give a lat/long per day: 5 days in {locations} doing {activity_list} with a {vibe} vibe:')
38
 
39
  #post process response, strip all lat/lons in order to plot,
40
 
41
- #CHART GENERATION
42
- df = pd.DataFrame(np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],columns=['lat', 'lon'])
43
- st.map(df)
44
 
45
- # TEXT TRIP
46
- st.subheader("Day by Day Itinerary")
47
- trip_view = st.container()
48
- for i in range(days):
49
- trip_view.write(f'**Day {i+1}** \n- Start the day in London by visiting the British Museum and other historic sites \n- Afterward, explore the city by taking a walking tour of the city \n- Finish the day by enjoying a pint at a local pub')
50
- st.text(" \n")
 
 
 
 
 
 
51
  else:
52
  st.error('Make sure you only enter no more than 2 activities and 3 locations!', icon="🌍")
53
  else:
 
34
 
35
  #openai request
36
  activity_list =','.join(activities)
37
+ #st.write(f'Plan a trip day by day with the given parameters, give a lat/long per day: 5 days in {locations} doing {activity_list} with a {vibe} vibe:')
38
 
39
  #post process response, strip all lat/lons in order to plot,
40
 
41
+ tab1, tab2 = st.tabs(["Map", "Itinerary"])
 
 
42
 
43
+ with tab1:
44
+ #CHART GENERATION
45
+ df = pd.DataFrame(np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],columns=['lat', 'lon'])
46
+ st.map(df)
47
+
48
+ with tab2:
49
+ # TEXT TRIP
50
+ st.subheader("Day by Day Itinerary")
51
+ trip_view = st.container()
52
+ for i in range(days):
53
+ trip_view.write(f'**Day {i+1}** \n- Start the day in London by visiting the British Museum and other historic sites \n- Afterward, explore the city by taking a walking tour of the city \n- Finish the day by enjoying a pint at a local pub')
54
+ st.text(" \n")
55
  else:
56
  st.error('Make sure you only enter no more than 2 activities and 3 locations!', icon="🌍")
57
  else: