Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ layoutreader_model_dir = snapshot_download('hantian/layoutreader')
|
|
19 |
|
20 |
# os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
|
21 |
os.system('cp magic-pdf.template.json ~/magic-pdf.json')
|
22 |
-
os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /
|
23 |
-
os.system(f"sed -i 's|/tmp/layoutreader|{layoutreader_model_dir}|g' /
|
24 |
os.system("sed -i 's|cpu|cuda|g' /root/magic-pdf.json")
|
25 |
|
26 |
os.system('cp -r paddleocr /home/user/.paddleocr')
|
|
|
19 |
|
20 |
# os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
|
21 |
os.system('cp magic-pdf.template.json ~/magic-pdf.json')
|
22 |
+
os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /home/user/magic-pdf.json")
|
23 |
+
os.system(f"sed -i 's|/tmp/layoutreader|{layoutreader_model_dir}|g' /home/user/magic-pdf.json")
|
24 |
os.system("sed -i 's|cpu|cuda|g' /root/magic-pdf.json")
|
25 |
|
26 |
os.system('cp -r paddleocr /home/user/.paddleocr')
|