myhloli commited on
Commit
50ab663
β€’
1 Parent(s): 00dfc38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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' /root/magic-pdf.json")
23
- os.system(f"sed -i 's|/tmp/layoutreader|{layoutreader_model_dir}|g' /root/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')
 
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')