halimbahae commited on
Commit
9b588f6
·
verified ·
1 Parent(s): 11c6755

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -4
app.py CHANGED
@@ -41,9 +41,28 @@ def main():
41
  conferences_now = data[(data['StartTime'] >= current_time_utc) & (data['EndTime'] <= current_time_utc)]
42
 
43
 
44
- st.markdown("# Happening Now 👇")
45
- if not conferences_now.empty:
46
- for index, row in conferences_now.iterrows():
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  st.markdown(f"### {row['SessionTitle']}")
48
  start_time = row['StartTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
49
  end_time = row['EndTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
@@ -54,9 +73,16 @@ def main():
54
  st.image(speaker['ImageURL'], caption=f"{speaker['SpeakerName']} - {speaker['JobTitle']}", width=200, use_column_width=False)
55
  st.markdown("---")
56
  else:
57
- st.write("No conferences are happening now. 🤷")
58
 
59
  data['Date'] = data['StartTime'].dt.date
 
 
 
 
 
 
 
60
  selected_day = st.sidebar.selectbox("Select Day", ["Select All"] + sorted(data['Date'].unique()))
61
  selected_location = st.sidebar.selectbox("Select Location", ["Select All"] + list(data['Location'].unique()))
62
  time_period = st.sidebar.selectbox("Select Time Period", ["Select All", "Morning", "Evening"])
 
41
  conferences_now = data[(data['StartTime'] >= current_time_utc) & (data['EndTime'] <= current_time_utc)]
42
 
43
 
44
+ # st.markdown("# Happening Now 👇")
45
+ # if not conferences_now.empty:
46
+ # for index, row in conferences_now.iterrows():
47
+ # st.markdown(f"### {row['SessionTitle']}")
48
+ # start_time = row['StartTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
49
+ # end_time = row['EndTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
50
+ # st.markdown(f"{start_time} - {end_time} (Africa/Casablanca)")
51
+ # st.markdown(f"#### Location: {row['Location']}")
52
+ # st.markdown(f"#### Speakers:")
53
+ # for speaker in row['Speakers']:
54
+ # st.image(speaker['ImageURL'], caption=f"{speaker['SpeakerName']} - {speaker['JobTitle']}", width=200, use_column_width=False)
55
+ # st.markdown("---")
56
+ # else:
57
+ # st.write("No conferences are happening now. 🤷")
58
+
59
+
60
+
61
+
62
+ # Display all conferences
63
+ st.markdown("# All Conferences 👇")
64
+ if not data.empty:
65
+ for index, row in data.iterrows():
66
  st.markdown(f"### {row['SessionTitle']}")
67
  start_time = row['StartTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
68
  end_time = row['EndTime'].astimezone(local_timezone).strftime("%d/%m/%Y %H:%M")
 
73
  st.image(speaker['ImageURL'], caption=f"{speaker['SpeakerName']} - {speaker['JobTitle']}", width=200, use_column_width=False)
74
  st.markdown("---")
75
  else:
76
+ st.write("No conferences available. 🤷")
77
 
78
  data['Date'] = data['StartTime'].dt.date
79
+
80
+
81
+
82
+
83
+ # data['Date'] = data['StartTime'].dt.date
84
+
85
+
86
  selected_day = st.sidebar.selectbox("Select Day", ["Select All"] + sorted(data['Date'].unique()))
87
  selected_location = st.sidebar.selectbox("Select Location", ["Select All"] + list(data['Location'].unique()))
88
  time_period = st.sidebar.selectbox("Select Time Period", ["Select All", "Morning", "Evening"])