Lisibonny commited on
Commit
3cb588d
1 Parent(s): f0b3fb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ from preprocesamiento_articulos import limpieza_articulos
7
  from entrenamiento_modelo import term_document_matrix, tf_idf_score
8
  from resultados_consulta import resultados_consulta, detalles_resultados
9
  import tensorflow as tf
 
10
 
11
  def split_frame(input_df, rows):
12
  df = [input_df.loc[i : i + rows - 1, :] for i in range(0, len(input_df), rows)]
@@ -137,7 +138,7 @@ def main():
137
  batch_size = 5
138
  bottom_menu = st.columns((2,1,1))
139
  with bottom_menu[1]:
140
- total_pages = (int(len(df_results) / batch_size) if int(len(df_results) / batch_size) > 0 else 1)
141
  current_page = st.number_input("Página", min_value=1, max_value=total_pages, step=1)
142
 
143
  with bottom_menu[0]:
 
7
  from entrenamiento_modelo import term_document_matrix, tf_idf_score
8
  from resultados_consulta import resultados_consulta, detalles_resultados
9
  import tensorflow as tf
10
+ from math import ceil
11
 
12
  def split_frame(input_df, rows):
13
  df = [input_df.loc[i : i + rows - 1, :] for i in range(0, len(input_df), rows)]
 
138
  batch_size = 5
139
  bottom_menu = st.columns((2,1,1))
140
  with bottom_menu[1]:
141
+ total_pages = (ceil(len(df_results) / batch_size) if int(ceil(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]: