Updated app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ from PIL import Image
|
|
7 |
import pandas as pd
|
8 |
|
9 |
|
10 |
-
|
11 |
def extract_text_images(
|
12 |
pdf_path: str, output_folder: str,
|
13 |
minimum_font_size: int,
|
@@ -234,6 +233,9 @@ def main():
|
|
234 |
os.path.join(os.getcwd(), "Extracted_Data")
|
235 |
)
|
236 |
|
|
|
|
|
|
|
237 |
if st.button("Start Extraction"):
|
238 |
if pdf_file is not None:
|
239 |
# Save uploaded PDF to a temporary location
|
@@ -286,24 +288,21 @@ def main():
|
|
286 |
.footer {
|
287 |
position: fixed;
|
288 |
bottom: 0;
|
289 |
-
left: 0;
|
290 |
width: 100%;
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
color: #FF0000;
|
298 |
}
|
299 |
</style>
|
300 |
<div class="footer">
|
301 |
-
|
302 |
</div>
|
303 |
""",
|
304 |
unsafe_allow_html=True
|
305 |
)
|
306 |
|
307 |
-
|
308 |
if __name__ == "__main__":
|
309 |
main()
|
|
|
7 |
import pandas as pd
|
8 |
|
9 |
|
|
|
10 |
def extract_text_images(
|
11 |
pdf_path: str, output_folder: str,
|
12 |
minimum_font_size: int,
|
|
|
233 |
os.path.join(os.getcwd(), "Extracted_Data")
|
234 |
)
|
235 |
|
236 |
+
# Convert the output folder to an absolute path
|
237 |
+
output_folder = os.path.abspath(os.path.expanduser(output_folder))
|
238 |
+
|
239 |
if st.button("Start Extraction"):
|
240 |
if pdf_file is not None:
|
241 |
# Save uploaded PDF to a temporary location
|
|
|
288 |
.footer {
|
289 |
position: fixed;
|
290 |
bottom: 0;
|
|
|
291 |
width: 100%;
|
292 |
+
text-align: center;
|
293 |
+
background-color: #f1f1f1;
|
294 |
+
padding: 10px;
|
295 |
+
font-size: 12px;
|
296 |
+
color: #333;
|
297 |
+
border-top: 1px solid #ccc;
|
|
|
298 |
}
|
299 |
</style>
|
300 |
<div class="footer">
|
301 |
+
© 2023 - PDF Extraction Tool
|
302 |
</div>
|
303 |
""",
|
304 |
unsafe_allow_html=True
|
305 |
)
|
306 |
|
|
|
307 |
if __name__ == "__main__":
|
308 |
main()
|