Spaces:
Running
on
L4
Running
on
L4
Update app.py
Browse files
app.py
CHANGED
@@ -9,16 +9,15 @@ import re
|
|
9 |
import uuid
|
10 |
import pymupdf
|
11 |
|
12 |
-
os.system('pip install -U magic-pdf==0.10.5')
|
13 |
-
|
|
|
14 |
|
15 |
os.system('wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py')
|
16 |
os.system('python download_models_hf.py')
|
17 |
os.system("sed -i 's|cpu|cuda|g' /home/user/magic-pdf.json")
|
18 |
-
os.system("sed -i 's|tablemaster|rapid_table|g' /home/user/magic-pdf.json")
|
19 |
|
20 |
os.system('cp -r paddleocr /home/user/.paddleocr')
|
21 |
-
|
22 |
os.system("pip install gradio-pdf==0.0.19")
|
23 |
from gradio_pdf import PDF
|
24 |
|
|
|
9 |
import uuid
|
10 |
import pymupdf
|
11 |
|
12 |
+
# os.system('pip install -U magic-pdf==0.10.5')
|
13 |
+
os.system('pip uninstall -y magic-pdf')
|
14 |
+
os.system('pip install git+https://github.com/opendatalab/MinerU.git@dev')
|
15 |
|
16 |
os.system('wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py')
|
17 |
os.system('python download_models_hf.py')
|
18 |
os.system("sed -i 's|cpu|cuda|g' /home/user/magic-pdf.json")
|
|
|
19 |
|
20 |
os.system('cp -r paddleocr /home/user/.paddleocr')
|
|
|
21 |
os.system("pip install gradio-pdf==0.0.19")
|
22 |
from gradio_pdf import PDF
|
23 |
|