cjber commited on
Commit
5f1b999
·
1 Parent(s): 1a31dcd

fix: don't use dashes in file names

Browse files

Former-commit-id: df09364e5c14e44c42a78c56a32d5cf7ef767776 [formerly 8c7b595d4dcf2c0a5ce353e31abbc87ecaa1dc06]
Former-commit-id: a298491865d31d236701c367e625460938f46d73

Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -124,16 +124,11 @@ if st.session_state["completed"]:
124
  .unique()
125
  .to_list()
126
  )
127
- representations_documents_dash = [
128
- "-".join(rep.split(" ")) for rep in representations_documents
129
- ]
130
 
131
  st.success("Reports built successfully! Please click download buttons below.")
132
- for rep_dash, rep in zip(representations_documents_dash, representations_documents):
133
- report_path = Paths.SUMMARY / f"Summary_Documents-{rep_dash}.pdf"
134
- summaries_path = (
135
- Paths.SUMMARY / f"Summary_of_Submitted_Responses-{rep_dash}.pdf"
136
- )
137
 
138
  col1, col2 = st.columns(2, border=True)
139
  with col1:
@@ -142,7 +137,7 @@ if st.session_state["completed"]:
142
  st.download_button(
143
  label=f"{rep}",
144
  data=pdf_file,
145
- file_name=f"Summary_of_Submitted_Responses-{rep_dash}.pdf",
146
  mime="application/pdf",
147
  type="primary",
148
  )
@@ -152,7 +147,7 @@ if st.session_state["completed"]:
152
  st.download_button(
153
  label=f"{rep}",
154
  data=pdf_file,
155
- file_name=f"Summary_Documents-{rep_dash}.pdf",
156
  mime="application/pdf",
157
  type="primary",
158
  )
 
124
  .unique()
125
  .to_list()
126
  )
 
 
 
127
 
128
  st.success("Reports built successfully! Please click download buttons below.")
129
+ for rep in representations_documents:
130
+ report_path = Paths.SUMMARY / f"Summary_Documents-{rep}.pdf"
131
+ summaries_path = Paths.SUMMARY / f"Summary_of_Submitted_Responses-{rep}.pdf"
 
 
132
 
133
  col1, col2 = st.columns(2, border=True)
134
  with col1:
 
137
  st.download_button(
138
  label=f"{rep}",
139
  data=pdf_file,
140
+ file_name=f"Summary_of_Submitted_Responses-{rep}.pdf",
141
  mime="application/pdf",
142
  type="primary",
143
  )
 
147
  st.download_button(
148
  label=f"{rep}",
149
  data=pdf_file,
150
+ file_name=f"Summary_Documents-{rep}.pdf",
151
  mime="application/pdf",
152
  type="primary",
153
  )