Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -157,6 +157,11 @@ if uploaded_files or manual_input:
|
|
| 157 |
for option in mcq['options']:
|
| 158 |
st.write(f"- {option}")
|
| 159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
elif task == "Adapt Lesson for Grades":
|
| 161 |
grade = st.slider("Select Grade:", 1, 16, 9)
|
| 162 |
if st.button("Adapt Lesson"):
|
|
|
|
| 157 |
for option in mcq['options']:
|
| 158 |
st.write(f"- {option}")
|
| 159 |
|
| 160 |
+
# Create the MCQs text for download
|
| 161 |
+
mcqs_text = "\n\n".join([f"**Q{idx + 1}:** {mcq['question']}\n" + "\n".join([f"- {option}" for option in mcq['options']]) for idx, mcq in enumerate(mcqs)])
|
| 162 |
+
mcqs_file = save_to_docx(mcqs_text, filename="mcqs.docx")
|
| 163 |
+
st.download_button("Download MCQs as DOCX", mcqs_file, file_name="mcqs.docx")
|
| 164 |
+
|
| 165 |
elif task == "Adapt Lesson for Grades":
|
| 166 |
grade = st.slider("Select Grade:", 1, 16, 9)
|
| 167 |
if st.button("Adapt Lesson"):
|