Diego Marroquin commited on
Commit ·
f5cd3c0
1
Parent(s): e603670
Debugging
Browse files
app.py
CHANGED
|
@@ -601,39 +601,21 @@ def run_app():
|
|
| 601 |
current_minute = current_datetime.strftime('%M')
|
| 602 |
current_second = current_datetime.strftime('%S')
|
| 603 |
|
| 604 |
-
with st.form("unfiltered_excel_form"):
|
| 605 |
-
unfiltered_submitted = st.form_submit_button("Get Unfiltered Excel")
|
| 606 |
-
|
| 607 |
-
with st.form("filtered_excel_form"):
|
| 608 |
-
filtered_submitted = st.form_submit_button("Get Filtered Excel")
|
| 609 |
-
|
| 610 |
-
if unfiltered_submitted:
|
| 611 |
-
# Save the DataFrame to the BytesIO object as an Excel file
|
| 612 |
-
df.to_excel(excel_buffer, index=True)
|
| 613 |
-
# Set the cursor position to the beginning of the BytesIO object
|
| 614 |
-
excel_buffer.seek(0)
|
| 615 |
-
|
| 616 |
-
# Provide the BytesIO object to the download button
|
| 617 |
-
download_button = st.download_button(
|
| 618 |
-
label="Download Excel",
|
| 619 |
-
data=excel_buffer,
|
| 620 |
-
file_name=f"nucmonitor_data_{current_year}-{current_month}-{current_day}-h{current_hour}m{current_minute}s{current_second}.xlsx",
|
| 621 |
-
mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 622 |
-
)
|
| 623 |
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
|
|
|
| 637 |
|
| 638 |
|
| 639 |
if __name__ == '__main__':
|
|
|
|
| 601 |
current_minute = current_datetime.strftime('%M')
|
| 602 |
current_second = current_datetime.strftime('%S')
|
| 603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 604 |
|
| 605 |
+
# Save the DataFrame to the BytesIO object as an Excel file
|
| 606 |
+
df.to_excel(excel_buffer, index=True)
|
| 607 |
+
# Set the cursor position to the beginning of the BytesIO object
|
| 608 |
+
excel_buffer.seek(0)
|
| 609 |
+
|
| 610 |
+
# Provide the BytesIO object to the download button
|
| 611 |
+
download_button = st.download_button(
|
| 612 |
+
label="Download Excel",
|
| 613 |
+
data=excel_buffer,
|
| 614 |
+
file_name=f"nucmonitor_data_{current_year}-{current_month}-{current_day}-h{current_hour}m{current_minute}s{current_second}.xlsx",
|
| 615 |
+
mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 616 |
+
)
|
| 617 |
+
|
| 618 |
+
|
| 619 |
|
| 620 |
|
| 621 |
if __name__ == '__main__':
|