Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -54,8 +54,22 @@ elif file_type == "PDF":
|
|
| 54 |
file_data = ""
|
| 55 |
for page in pdf_reader.pages:
|
| 56 |
file_data += page.extract_text()
|
|
|
|
| 57 |
st.write("Uploaded PDF file:")
|
| 58 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
else:
|
| 60 |
file_data = st.text_area("Enter text here")
|
| 61 |
|
|
@@ -76,4 +90,4 @@ hide_streamlit_style = """
|
|
| 76 |
footer {visibility: hidden;}
|
| 77 |
</style>
|
| 78 |
"""
|
| 79 |
-
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
|
|
|
| 54 |
file_data = ""
|
| 55 |
for page in pdf_reader.pages:
|
| 56 |
file_data += page.extract_text()
|
| 57 |
+
|
| 58 |
st.write("Uploaded PDF file:")
|
| 59 |
+
with st.container():
|
| 60 |
+
st.markdown(
|
| 61 |
+
"<style>"
|
| 62 |
+
".scrollable {"
|
| 63 |
+
" max-height: 300px;"
|
| 64 |
+
" overflow-y: auto;"
|
| 65 |
+
"}"
|
| 66 |
+
"</style>"
|
| 67 |
+
'<div class="scrollable">'
|
| 68 |
+
+ file_data.replace("\n", "<br>")
|
| 69 |
+
+ "</div>",
|
| 70 |
+
unsafe_allow_html=True,
|
| 71 |
+
)
|
| 72 |
+
st.markdown("")
|
| 73 |
else:
|
| 74 |
file_data = st.text_area("Enter text here")
|
| 75 |
|
|
|
|
| 90 |
footer {visibility: hidden;}
|
| 91 |
</style>
|
| 92 |
"""
|
| 93 |
+
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|