Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(model download script) #922

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ This project currently uses PyMuPDF to achieve advanced functionality. However,
# Acknowledgments

- [PDF-Extract-Kit](https://github.com/opendatalab/PDF-Extract-Kit)
- [DocLayout-YOLO](https://github.com/opendatalab/DocLayout-YOLO)
- [StructEqTable](https://github.com/UniModal4Reasoning/StructEqTable-Deploy)
- [RapidTable](https://github.com/RapidAI/RapidTable)
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
- [PyMuPDF](https://github.com/pymupdf/PyMuPDF)
- [layoutreader](https://github.com/ppaanngggg/layoutreader)
Expand Down
2 changes: 2 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ TODO
# Acknowledgments

- [PDF-Extract-Kit](https://github.com/opendatalab/PDF-Extract-Kit)
- [DocLayout-YOLO](https://github.com/opendatalab/DocLayout-YOLO)
- [StructEqTable](https://github.com/UniModal4Reasoning/StructEqTable-Deploy)
- [RapidTable](https://github.com/RapidAI/RapidTable)
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
- [PyMuPDF](https://github.com/pymupdf/PyMuPDF)
- [layoutreader](https://github.com/ppaanngggg/layoutreader)
Expand Down
59 changes: 0 additions & 59 deletions docs/download_models.py

This file was deleted.

66 changes: 0 additions & 66 deletions docs/download_models_hf.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/how_to_download_models_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Use a Python Script to Download Model Files from Hugging Face

```bash
pip install huggingface_hub
wget https://github.com/opendatalab/MinerU/raw/master/docs/download_models_hf.py -O download_models_hf.py
wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
```

Expand Down
4 changes: 2 additions & 2 deletions docs/how_to_download_models_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<summary>方法一:从 Hugging Face 下载模型</summary>
<p>使用python脚本 从Hugging Face下载模型文件</p>
<pre><code>pip install huggingface_hub
wget https://gitee.com/myhloli/MinerU/raw/master/docs/download_models_hf.py -O download_models_hf.py
wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py</code></pre>
</details>

Expand All @@ -18,7 +18,7 @@ python download_models_hf.py</code></pre>

```bash
pip install modelscope
wget https://gitee.com/myhloli/MinerU/raw/master/docs/download_models.py -O download_models.py
wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py
python download_models.py
```

Expand Down
2 changes: 1 addition & 1 deletion magic-pdf.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"enable": true
},
"table-config": {
"model": "tablemaster",
"model": "rapid_table",
"enable": false,
"max_time": 400
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def download_and_modify_json(url, local_filename, modifications):
print(f'model_dir is: {model_dir}')
print(f'layoutreader_model_dir is: {layoutreader_model_dir}')

json_url = 'https://gitee.com/myhloli/MinerU/raw/dev/magic-pdf.template.json'
json_url = 'https://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json'
config_file_name = 'magic-pdf.json'
home_dir = os.path.expanduser('~')
config_file = os.path.join(home_dir, config_file_name)
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_models_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def download_and_modify_json(url, local_filename, modifications):
print(f'model_dir is: {model_dir}')
print(f'layoutreader_model_dir is: {layoutreader_model_dir}')

json_url = 'https://github.com/opendatalab/MinerU/raw/dev/magic-pdf.template.json'
json_url = 'https://github.com/opendatalab/MinerU/raw/master/magic-pdf.template.json'
config_file_name = 'magic-pdf.json'
home_dir = os.path.expanduser('~')
config_file = os.path.join(home_dir, config_file_name)
Expand Down
Loading