Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -15,16 +15,19 @@ sys.path.append(os.path.dirname(__file__))
|
|
| 15 |
from utils import toc_processor
|
| 16 |
from pdfxmeta import pdfxmeta
|
| 17 |
|
| 18 |
-
st.set_page_config(page_title="PDF Bookmark
|
| 19 |
|
| 20 |
-
st.title("PDF
|
| 21 |
|
| 22 |
st.markdown("""
|
| 23 |
-
**Upload a PDF**, analyze its fonts to find
|
| 24 |
""")
|
| 25 |
|
| 26 |
uploaded_file = st.file_uploader("Choose a PDF file", type="pdf")
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
if uploaded_file is not None:
|
| 29 |
# We need to save the uploaded file to disk for the CLI tools to read it
|
| 30 |
# We'll use a permanent temp file for the session so we don't have to re-upload constantly
|
|
|
|
| 15 |
from utils import toc_processor
|
| 16 |
from pdfxmeta import pdfxmeta
|
| 17 |
|
| 18 |
+
st.set_page_config(page_title="PDF Bookmark Splitter", layout="wide")
|
| 19 |
|
| 20 |
+
st.title("PDF Bookmarker & Splitter")
|
| 21 |
|
| 22 |
st.markdown("""
|
| 23 |
+
**Upload a PDF**, analyze its fonts to find top-level headings, and generate Bookmarks for splitting by chapter.
|
| 24 |
""")
|
| 25 |
|
| 26 |
uploaded_file = st.file_uploader("Choose a PDF file", type="pdf")
|
| 27 |
|
| 28 |
+
# Short guidance shown under the uploader
|
| 29 |
+
st.caption("Recommended use: After uploading your PDF, search for the text of a known chapter heading. Once the correct entry is identified in the search results, select the corresponding entry from the drop down, and optionally repeat the step to ensure back matter is split off from the last chapter before running the pipeline.")
|
| 30 |
+
|
| 31 |
if uploaded_file is not None:
|
| 32 |
# We need to save the uploaded file to disk for the CLI tools to read it
|
| 33 |
# We'll use a permanent temp file for the session so we don't have to re-upload constantly
|