DevBM commited on
Commit
3982c1e
1 Parent(s): 56c280b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -134,15 +134,20 @@ if st.button("Generate Questions"):
134
 
135
  # Export buttons
136
  # if st.button("Export to CSV"):
137
- if downlaod_csv:
138
- csv_data = export_to_csv(data)
139
- st.success("Questions exported to questions.csv")
140
- st.download_button(label="Download CSV", data=csv_data, file_name='questions.csv', mime='text/csv')
 
 
141
 
142
  # if st.button("Export to PDF"):
143
- if download_pdf:
144
- pdf_data = export_to_pdf(data)
145
- st.success("Questions exported to questions.pdf")
146
- st.download_button(label="Download PDF", data=pdf_data, file_name='questions.pdf', mime='application/pdf')
 
 
 
147
  else:
148
  st.write("Please enter some text to generate questions.")
 
134
 
135
  # Export buttons
136
  # if st.button("Export to CSV"):
137
+ # if downlaod_csv:
138
+ # csv_data = export_to_csv(data)
139
+ # st.success("Questions exported to questions.csv")
140
+ # st.download_button(label="Download CSV", data=csv_data, file_name='questions.csv', mime='text/csv')
141
+ csv_data = export_to_csv(data)
142
+ st.download_button(label="Download CSV", data=csv_data, file_name='questions.csv', mime='text/csv')
143
 
144
  # if st.button("Export to PDF"):
145
+ # if download_pdf:
146
+ # pdf_data = export_to_pdf(data)
147
+ # st.success("Questions exported to questions.pdf")
148
+ # st.download_button(label="Download PDF", data=pdf_data, file_name='questions.pdf', mime='application/pdf')
149
+ pdf_data = export_to_pdf(data)
150
+ st.download_button(label="Download PDF", data=pdf_data, file_name='questions.pdf', mime='application/pdf')
151
+
152
  else:
153
  st.write("Please enter some text to generate questions.")