KeshavRa commited on
Commit
edbe9e1
·
verified ·
1 Parent(s): 17b4f07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -18
app.py CHANGED
@@ -210,25 +210,24 @@ else:
210
 
211
  # convert pandas df into list of dicts
212
  shelters = shelters.to_dict(orient='records')
213
- print(shelters)
214
- print(type(shelters))
215
 
216
- # # Display the current shelter information
217
- # shelter = shelters[st.session_state.shelter_index]
218
- # st.write(shelter["description"])
219
 
220
- # # Create two columns
221
- # col1, col2 = st.columns([1,1])
222
 
223
- # # Add buttons to each column
224
- # with col1:
225
- # if st.button("Previous"):
226
- # if st.session_state.shelter_index > 0:
227
- # st.session_state.shelter_index -= 1
228
- # st.experimental_rerun()
229
 
230
- # with col2:
231
- # if st.button("Next"):
232
- # if st.session_state.shelter_index < len(shelters) - 1:
233
- # st.session_state.shelter_index += 1
234
- # st.experimental_rerun()
 
 
 
 
 
 
 
 
210
 
211
  # convert pandas df into list of dicts
212
  shelters = shelters.to_dict(orient='records')
 
 
213
 
214
+ # Display the current shelter information
215
+ shelter = shelters[st.session_state.shelter_index]
 
216
 
217
+ st.header(f"{shelter['Organization Name']}: {shelter['Program Name']}")
 
218
 
219
+ # Create two columns
220
+ col1, col2 = st.columns([1,1])
 
 
 
 
221
 
222
+ # Add buttons to each column
223
+ with col1:
224
+ if st.button("Previous"):
225
+ if st.session_state.shelter_index > 0:
226
+ st.session_state.shelter_index -= 1
227
+ st.experimental_rerun()
228
+
229
+ with col2:
230
+ if st.button("Next"):
231
+ if st.session_state.shelter_index < len(shelters) - 1:
232
+ st.session_state.shelter_index += 1
233
+ st.experimental_rerun()