Spaces:
Runtime error
Runtime error
Fix #2
Browse files
app.py
CHANGED
|
@@ -71,7 +71,6 @@ try:
|
|
| 71 |
summarize_text(stack)
|
| 72 |
pdf_output.append(stack)
|
| 73 |
|
| 74 |
-
pdf_summary = '\n'.join(pdf_output)
|
| 75 |
|
| 76 |
|
| 77 |
except: # Handle blank file error
|
|
@@ -79,6 +78,8 @@ except: # Handle blank file error
|
|
| 79 |
|
| 80 |
# Prepare output
|
| 81 |
|
|
|
|
|
|
|
| 82 |
# summary_pdf = pdfkit.from_string(pdf_output, 'Summary.pdf')
|
| 83 |
|
| 84 |
|
|
@@ -92,6 +93,32 @@ if st.button('Summarize pdf page'):
|
|
| 92 |
</p>
|
| 93 |
</div>
|
| 94 |
''', unsafe_allow_html=True)
|
| 95 |
-
st.write('Download summary pdf here')
|
| 96 |
-
download_button = st.download_button(summary_pdf, label='Download summary')
|
| 97 |
-
st.success('PDF page summarized :)', icon="✅")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
summarize_text(stack)
|
| 72 |
pdf_output.append(stack)
|
| 73 |
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
except: # Handle blank file error
|
|
|
|
| 78 |
|
| 79 |
# Prepare output
|
| 80 |
|
| 81 |
+
pdf_summary = '\n'.join(pdf_output)
|
| 82 |
+
|
| 83 |
# summary_pdf = pdfkit.from_string(pdf_output, 'Summary.pdf')
|
| 84 |
|
| 85 |
|
|
|
|
| 93 |
</p>
|
| 94 |
</div>
|
| 95 |
''', unsafe_allow_html=True)
|
| 96 |
+
# st.write('Download summary pdf here')
|
| 97 |
+
# download_button = st.download_button(summary_pdf, label='Download summary')
|
| 98 |
+
st.success('PDF page summarized :)', icon="✅")
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
st.write('')
|
| 106 |
+
st.write('')
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
st.markdown("<hr style='border: 1px dashed #ddd; margin: 2rem;'>", unsafe_allow_html=True) #Horizontal line
|
| 110 |
+
|
| 111 |
+
st.markdown("""
|
| 112 |
+
<div style="text-align: center; padding: 1rem;">
|
| 113 |
+
Project by <a href="https://github.com/ChibuzoKelechi" target="_blank" style="color: white; font-weight: bold; text-decoration: none;">
|
| 114 |
+
kelechi_tensor</a>
|
| 115 |
+
</div>
|
| 116 |
+
|
| 117 |
+
<div style="text-align: center; padding: 1rem;">
|
| 118 |
+
Data from <a href="https://kaggle.com" target="_blank" style="color: lightblue; font-weight: bold; text-decoration: none;">
|
| 119 |
+
Kaggle</a>
|
| 120 |
+
</div>
|
| 121 |
+
""",
|
| 122 |
+
unsafe_allow_html=True)
|
| 123 |
+
|
| 124 |
+
# Peace Out :)
|