Upload app.py
Browse files
app.py
CHANGED
@@ -323,7 +323,7 @@ def display_instructions():
|
|
323 |
- **No Extra Data**: Avoid including any extra rows or columns outside of the specified format.
|
324 |
- **Check for Errors**: Verify there are no typographical errors in the column headings.
|
325 |
- **Repeat for Multiple Rooms**: If you need to analyze multiple rooms, repeat the process for each room individually.
|
326 |
-
- **Save Your Work**: Regularly
|
327 |
|
328 |
By following these instructions, you will be able to use the Building Acoustics Analysis Tool effectively and
|
329 |
obtain accurate acoustic analysis for your room. If you encounter any issues, refer to these instructions or
|
@@ -758,31 +758,31 @@ def display_intelligibility_noise_reduction():
|
|
758 |
st.write("Updated Sound Pressure Levels:")
|
759 |
st.dataframe(updated_df, use_container_width=True)
|
760 |
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
# Main content display based on the current tab
|
787 |
if st.session_state.current_tab == "Instructions":
|
788 |
display_instructions()
|
|
|
323 |
- **No Extra Data**: Avoid including any extra rows or columns outside of the specified format.
|
324 |
- **Check for Errors**: Verify there are no typographical errors in the column headings.
|
325 |
- **Repeat for Multiple Rooms**: If you need to analyze multiple rooms, repeat the process for each room individually.
|
326 |
+
- **Save Your Work**: Regularly download the PDF report after completing your analysis.
|
327 |
|
328 |
By following these instructions, you will be able to use the Building Acoustics Analysis Tool effectively and
|
329 |
obtain accurate acoustic analysis for your room. If you encounter any issues, refer to these instructions or
|
|
|
758 |
st.write("Updated Sound Pressure Levels:")
|
759 |
st.dataframe(updated_df, use_container_width=True)
|
760 |
|
761 |
+
# PDF Download Button
|
762 |
+
st.write("""
|
763 |
+
**IMPORTANT NOTE ABOUT PDF REPORT:** The purpose of the PDF report is to provide you detailed record of all
|
764 |
+
your input data and the graphs generated. Graphs in PDF report are of low resolutions. Hence, remember to download
|
765 |
+
individual graphs and tables to include in your report. Hover your mouse over a graph and several icons would
|
766 |
+
appear at the top right corner of the graph, click the first icon to download the graph. Repeat the same process
|
767 |
+
to download tables.
|
768 |
+
""")
|
769 |
+
if st.button("Download PDF Report"):
|
770 |
+
pdf = generate_pdf(
|
771 |
+
st.session_state.volume,
|
772 |
+
st.session_state.current_rt,
|
773 |
+
st.session_state.existing_materials,
|
774 |
+
{freq: st.session_state.min_rt_val for freq in st.session_state.frequencies},
|
775 |
+
{freq: st.session_state.max_rt_val for freq in st.session_state.frequencies},
|
776 |
+
st.session_state.desired_rt,
|
777 |
+
st.session_state.new_materials,
|
778 |
+
st.session_state.fig1,
|
779 |
+
st.session_state.fig2,
|
780 |
+
st.session_state.df_sound_pressure,
|
781 |
+
updated_df
|
782 |
+
)
|
783 |
+
st.download_button(label="Download PDF", data=pdf, file_name="Room_Acoustics_Report.pdf",
|
784 |
+
mime="application/pdf")
|
785 |
+
|
786 |
# Main content display based on the current tab
|
787 |
if st.session_state.current_tab == "Instructions":
|
788 |
display_instructions()
|