eaglelandsonce commited on
Commit
de89b73
·
verified ·
1 Parent(s): 777af07

Update pages/07_Physics_Test_Sets.py

Browse files
Files changed (1) hide show
  1. pages/07_Physics_Test_Sets.py +3 -15
pages/07_Physics_Test_Sets.py CHANGED
@@ -7,25 +7,13 @@ st.title("Physics Test Sets")
7
  # Create a column layout for displaying links
8
  col1, col2, col3 = st.columns(3)
9
 
10
- # Function to display a clickable link for the PDF
11
  def create_pdf_link(pdf_name, file_path):
12
  with open(file_path, "rb") as f:
13
  st.download_button(label=pdf_name, data=f, file_name=pdf_name, mime="application/pdf")
14
 
15
- # Display the first PDF link in the first column
16
  with col1:
17
- st.write("Electrodynamics Test Set 1")
18
- create_pdf_link("eJackson_set1.pdf", os.path.join("psets", "eJackson_set1.pdf"))
19
 
20
  # Add more columns and rows as needed for additional PDFs
21
- # Example of another row:
22
- '''
23
- with col2:
24
- st.write("Electrodynamics Test Set 2")
25
- create_pdf_link("eJackson_set2.pdf", os.path.join("psets", "eJackson_set2.pdf"))
26
-
27
- with col3:
28
- st.write("Electrodynamics Test Set 3")
29
- create_pdf_link("eJackson_set3.pdf", os.path.join("psets", "eJackson_set3.pdf"))
30
- '''
31
- # More rows and columns can be added as needed
 
7
  # Create a column layout for displaying links
8
  col1, col2, col3 = st.columns(3)
9
 
10
+ # Function to display a clickable download link for the PDF
11
  def create_pdf_link(pdf_name, file_path):
12
  with open(file_path, "rb") as f:
13
  st.download_button(label=pdf_name, data=f, file_name=pdf_name, mime="application/pdf")
14
 
15
+ # Display the first PDF link as a clickable download button in the first column
16
  with col1:
17
+ create_pdf_link("Electrodynamics Test Set 1", os.path.join("psets", "eJackson_set1.pdf"))
 
18
 
19
  # Add more columns and rows as needed for additional PDFs