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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -23
app.py CHANGED
@@ -207,29 +207,28 @@ else:
207
  shelters = shelters.head(3)
208
 
209
  st.table(shelters)
 
 
 
 
 
 
 
 
 
210
 
211
- shelters = [
212
- {"title": "Shelter 1", "description": "This is the 1st shelter",},
213
- {"title": "Shelter 2", "description": "This is the 2nd shelter.",},
214
- {"title": "Shelter 3", "description": "This is the 3rd shelter.",}
215
- ]
216
-
217
- # Display the current shelter information
218
- shelter = shelters[st.session_state.shelter_index]
219
- st.write(shelter["description"])
220
-
221
- # Create two columns
222
- col1, col2 = st.columns([1,1])
223
 
224
- # Add buttons to each column
225
- with col1:
226
- if st.button("Previous"):
227
- if st.session_state.shelter_index > 0:
228
- st.session_state.shelter_index -= 1
229
- st.experimental_rerun()
230
 
231
- with col2:
232
- if st.button("Next"):
233
- if st.session_state.shelter_index < len(shelters) - 1:
234
- st.session_state.shelter_index += 1
235
- st.experimental_rerun()
 
207
  shelters = shelters.head(3)
208
 
209
  st.table(shelters)
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()