Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,14 +67,14 @@ try:
|
|
67 |
pdf_input = extract_text(uploaded_pdf)
|
68 |
st.success('Text extracted')
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
|
76 |
with st.spinner('Summarizing extracted text...'):
|
77 |
-
pdf_summary = '\n'.join(pdf_output)
|
78 |
st.success('Summary complete')
|
79 |
|
80 |
except: # Handle blank file error
|
@@ -118,8 +118,8 @@ st.markdown("""
|
|
118 |
</div>
|
119 |
|
120 |
<div style="text-align: center; padding: 1rem;">
|
121 |
-
|
122 |
-
|
123 |
</div>
|
124 |
""",
|
125 |
unsafe_allow_html=True)
|
|
|
67 |
pdf_input = extract_text(uploaded_pdf)
|
68 |
st.success('Text extracted')
|
69 |
|
70 |
+
pdf_output = []
|
71 |
|
72 |
+
for stack in pdf_input:
|
73 |
+
summarize_text(stack)
|
74 |
+
pdf_output.append(stack)
|
75 |
|
76 |
with st.spinner('Summarizing extracted text...'):
|
77 |
+
pdf_summary = '\n\n'.join(pdf_output)
|
78 |
st.success('Summary complete')
|
79 |
|
80 |
except: # Handle blank file error
|
|
|
118 |
</div>
|
119 |
|
120 |
<div style="text-align: center; padding: 1rem;">
|
121 |
+
Resources <a href="https://huggingface.co" target="_blank" style="color: white; font-weight: bold; text-decoration: none;">
|
122 |
+
Hugging face</a>
|
123 |
</div>
|
124 |
""",
|
125 |
unsafe_allow_html=True)
|