support_mineru_1

This commit is contained in:
xunge 2025-01-12 10:42:08 +08:00
parent a6de631d15
commit e93a32ad15
2 changed files with 0 additions and 28 deletions

Binary file not shown.

View File

@ -1,28 +0,0 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path-to-pdf-file>"
exit 1
fi
FILE_PATH=$(realpath "$1")
if [ ! -f "$FILE_PATH" ]; then
echo "File not found: $FILE_PATH"
exit 1
fi
conda activate mineru
if ! command -v magic-pdf &> /dev/null; then
echo "magic-pdf could not be found in the current conda environment"
exit 1
fi
magic-pdf pdf-command --pdf "$FILE_PATH" --inside_model true
if [ $? -eq 0 ]; then
echo "PDF conversion successful"
else
echo "PDF conversion failed"
exit 1
fi