how_to_download_models_en.md 1.4 KB
Newer Older
1
### Install Git LFS
2
3
4
5
6
7
Before you begin, make sure Git Large File Storage (Git LFS) is installed on your system. Install it using the following command:

```bash
git lfs install
```

8
### Download the Model from Hugging Face
9
10
11
12
13
14
15
16
17
To download the `PDF-Extract-Kit` model from Hugging Face, use the following command:

```bash
git lfs clone https://huggingface.co/wanderkid/PDF-Extract-Kit
```

Ensure that Git LFS is enabled during the clone to properly download all large files.


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

### Download the Model from ModelScope

#### SDK Download

```bash
# First, install the ModelScope library using pip:
pip install modelscope
```

```python
# Use the following Python code to download the model using the ModelScope SDK:
from modelscope import snapshot_download
model_dir = snapshot_download('wanderkid/PDF-Extract-Kit')
```

#### Git Download
Alternatively, you can use Git to clone the model repository from ModelScope:

```bash
38
git lfs clone https://www.modelscope.cn/wanderkid/PDF-Extract-Kit.git
39
40
41
42
```


Put [model files]() here:
43
44
45
46
47

```
./
├── Layout
│   ├── config.json
48
│   └── weights.pth
49
50
51
52
53
54
55
56
57
58
59
├── MFD
│   └── weights.pt
├── MFR
│   └── UniMERNet
│       ├── config.json
│       ├── preprocessor_config.json
│       ├── pytorch_model.bin
│       ├── README.md
│       ├── tokenizer_config.json
│       └── tokenizer.json
└── README.md
60
```