myhloli commited on
Commit
f78735b
1 Parent(s): b16a3a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,9 +15,9 @@ from huggingface_hub import snapshot_download
15
  model_dir = snapshot_download('opendatalab/PDF-Extract-Kit')
16
 
17
  os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
18
- os.system('cp magic-pdf.template.json /root/magic-pdf.json')
19
- os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /root/magic-pdf.json")
20
- # os.system("sed -i 's|cpu|cuda|g' /root/magic-pdf.json")
21
 
22
  import gradio as gr
23
  from loguru import logger
 
15
  model_dir = snapshot_download('opendatalab/PDF-Extract-Kit')
16
 
17
  os.system('wget https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json')
18
+ os.system('cp magic-pdf.template.json ~/magic-pdf.json')
19
+ os.system(f"sed -i 's|/tmp/models|{model_dir}/models|g' /home/user/magic-pdf.json")
20
+ # os.system("sed -i 's|cpu|cuda|g' /home/user/magic-pdf.json")
21
 
22
  import gradio as gr
23
  from loguru import logger