tensorkelechi commited on
Commit
37ff84b
·
verified ·
1 Parent(s): b2b8748

First fix - Text to PDF

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -62,12 +62,12 @@ try:
62
  page_text = page.extract_text()
63
  page_text_stack.append(page_text)
64
 
65
- pages_stack = []
66
 
67
- for text_stack in page_text_stack:
68
- pages_stack.append(text_stack)
69
-
70
- return page_text
71
 
72
 
73
 
@@ -76,9 +76,12 @@ except: # Handle blank file error
76
  st.error('Please select a valid file')
77
 
78
  # Prepare output
 
79
  pdf_input = extract_text(uploaded_pdf)
 
80
  pdf_output = summarize_text(pdf_input)
81
- summary_pdf = pdfkit.from_sting(pdf_input, 'Summary.pdf')
 
82
 
83
 
84
 
 
62
  page_text = page.extract_text()
63
  page_text_stack.append(page_text)
64
 
65
+ # pages_stack = []
66
 
67
+ # for text_stack in page_text_stack:
68
+ # pages_stack.append(text_stack)
69
+
70
+ return page_text_stack
71
 
72
 
73
 
 
76
  st.error('Please select a valid file')
77
 
78
  # Prepare output
79
+
80
  pdf_input = extract_text(uploaded_pdf)
81
+
82
  pdf_output = summarize_text(pdf_input)
83
+
84
+ summary_pdf = pdfkit.from_string(pdf_output, 'Summary.pdf')
85
 
86
 
87