Snigdhapaul2003 commited on
Commit
aa9258b
·
verified ·
1 Parent(s): 1df81a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -142,7 +142,7 @@ def process_pdfs_and_generate_question_paper(uploaded_files, name, number_of_sec
142
  # doc.save(file_name)
143
  # return file_name
144
 
145
- def save_markdown_to_word(markdown_text, file_name):
146
  # Create a new Document
147
  doc = Document()
148
 
@@ -195,7 +195,7 @@ def main_interface(uploaded_files, name, number_of_sections, difficulty_level, *
195
  calculated_marks = sum(section['num_questions'] * section['marks_per_question'] for section in sections)
196
 
197
  response = process_pdfs_and_generate_question_paper(uploaded_files, name, number_of_sections, sections, difficulty_level, calculated_marks)
198
- word_file = save_markdown_to_word(response.text, f"{name}.docx")
199
  return response.text, word_file
200
 
201
 
 
142
  # doc.save(file_name)
143
  # return file_name
144
 
145
+ def save_markdown_to_word(markdown_text, name, file_name):
146
  # Create a new Document
147
  doc = Document()
148
 
 
195
  calculated_marks = sum(section['num_questions'] * section['marks_per_question'] for section in sections)
196
 
197
  response = process_pdfs_and_generate_question_paper(uploaded_files, name, number_of_sections, sections, difficulty_level, calculated_marks)
198
+ word_file = save_markdown_to_word(response.text, name, f"{name}.docx")
199
  return response.text, word_file
200
 
201