Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,4 +25,14 @@ def summarizer(text):
|
|
| 25 |
|
| 26 |
|
| 27 |
st.title(':blue[Abstractive Summarizer]')
|
| 28 |
-
st.header('by: _Team_ _Rare_ _species_')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
st.title(':blue[Abstractive Summarizer]')
|
| 28 |
+
st.header('by: _Team_ _Rare_ _species_')
|
| 29 |
+
|
| 30 |
+
uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
|
| 31 |
+
if uploaded_file is not None:
|
| 32 |
+
if st.button('Summarize Document'):
|
| 33 |
+
with st.spinner("📚 Please wait while we produce a summary..."):
|
| 34 |
+
try:
|
| 35 |
+
text=read_pdf(uploaded_file)
|
| 36 |
+
st.write(text)
|
| 37 |
+
except Exception as e:
|
| 38 |
+
logging.exception(e)
|