princhman commited on
Commit
0a323e6
·
1 Parent(s): 1e9bbdd

Adding model download

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -56,5 +56,11 @@ async def process_pdf(
56
  }
57
 
58
  if __name__ == "__main__":
 
 
 
 
 
 
59
  rabbit_worker()
60
  uvicorn.run(app, host="0.0.0.0", port=8000)
 
56
  }
57
 
58
  if __name__ == "__main__":
59
+ os.system('pip uninstall -y magic-pdf')
60
+ os.system('pip install git+https://github.com/opendatalab/MinerU.git@dev')
61
+ # os.system('pip install git+https://github.com/myhloli/Magic-PDF.git@dev')
62
+
63
+ os.system('wget https://github.com/opendatalab/MinerU/raw/dev/scripts/download_models_hf.py -O download_models_hf.py')
64
+ os.system('python download_models_hf.py')
65
  rabbit_worker()
66
  uvicorn.run(app, host="0.0.0.0", port=8000)