Lisibonny commited on
Commit
ae96240
1 Parent(s): 103e1be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -122,7 +122,6 @@ def main():
122
  df_results=detalles_resultados(df,result)
123
  pagination = st.container()
124
  batch_size = 2
125
- total_pages = (int(len(df_results) / batch_size) if int(len(df_results) / batch_size) > 0 else 1)
126
  with pagination:
127
  N_cards_per_row = 1
128
  for n_row, row in df_results.reset_index().iterrows():
@@ -137,12 +136,19 @@ def main():
137
  st.markdown(f"{row['resumen'].strip()}")
138
  st.markdown(f"{row['link']}")
139
 
140
- current_page = st.number_input("Página", min_value=1, max_value=total_pages, step=1)
141
- st.markdown(f"Página **{current_page}** de **{total_pages}** ")
 
 
 
 
 
 
 
142
 
143
 
144
  pages = split_frame(df_results, batch_size)
145
  pagination.dataframe(data=pages[current_page - 1], use_container_width=True)
146
 
147
  if __name__ == "__main__":
148
- main()
 
122
  df_results=detalles_resultados(df,result)
123
  pagination = st.container()
124
  batch_size = 2
 
125
  with pagination:
126
  N_cards_per_row = 1
127
  for n_row, row in df_results.reset_index().iterrows():
 
136
  st.markdown(f"{row['resumen'].strip()}")
137
  st.markdown(f"{row['link']}")
138
 
139
+ bottom_menu = st.columns((3, 1, 1))
140
+ with bottom_menu[1]:
141
+ total_pages = (int(len(df_results) / batch_size) if int(len(df_results) / batch_size) > 0 else 1)
142
+ current_page = st.number_input("Página", min_value=1, max_value=total_pages, step=1)
143
+
144
+ with bottom_menu[0]:
145
+
146
+
147
+ st.markdown(f"Página **{current_page}** de **{total_pages}** ")
148
 
149
 
150
  pages = split_frame(df_results, batch_size)
151
  pagination.dataframe(data=pages[current_page - 1], use_container_width=True)
152
 
153
  if __name__ == "__main__":
154
+ main()