Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -124,21 +124,20 @@ def main():
|
|
124 |
batch_size = 5
|
125 |
pages = split_frame(df_results, batch_size)
|
126 |
pagination = st.container()
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
bottom_menu = st.columns((2,1,1))
|
143 |
with bottom_menu[1]:
|
144 |
total_pages = (ceil(len(df_results) / batch_size) if ceil(len(df_results) / batch_size) > 0 else 1)
|
|
|
124 |
batch_size = 5
|
125 |
pages = split_frame(df_results, batch_size)
|
126 |
pagination = st.container()
|
127 |
+
with pagination:
|
128 |
+
N_cards_per_row = 1
|
129 |
+
for n_row, row in pages.reset_index().iterrows():
|
130 |
+
i = n_row%N_cards_per_row
|
131 |
+
if i==0:
|
132 |
+
st.write("---")
|
133 |
+
cols = st.columns(N_cards_per_row, gap="large")
|
134 |
+
# draw the card
|
135 |
+
with cols[n_row%N_cards_per_row]:
|
136 |
+
st.caption(f"{row['feed'].strip()} - {row['seccion'].strip()} - {row['fecha'].strip()} ")
|
137 |
+
st.markdown(f"**{row['titulo'].strip()}**")
|
138 |
+
st.markdown(f"{row['resumen'].strip()}")
|
139 |
+
st.markdown(f"{row['link']}")
|
140 |
+
|
|
|
141 |
bottom_menu = st.columns((2,1,1))
|
142 |
with bottom_menu[1]:
|
143 |
total_pages = (ceil(len(df_results) / batch_size) if ceil(len(df_results) / batch_size) > 0 else 1)
|