Update README.md
Browse files
README.md
CHANGED
@@ -66,16 +66,26 @@ Requirements:
|
|
66 |
- Docker with GPU support [(NVIDIA Toolkit)](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
|
67 |
- Pre-downloaded model: [OCRFlux-3B](https://huggingface.co/ChatDOC/OCRFlux-3B)
|
68 |
|
69 |
-
To use OCRFlux in a docker container, you can use the following example command:
|
70 |
|
71 |
```bash
|
72 |
docker run -it --gpus all \
|
73 |
-v /path/to/localworkspace:/localworkspace \
|
74 |
-
-v /path/to/test_pdf_dir:/test_pdf_dir
|
75 |
-v /path/to/OCRFlux-3B:/OCRFlux-3B \
|
76 |
-
|
|
|
77 |
```
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
#### Viewing Results
|
80 |
Generate the final Markdown files by running the following command. Generated Markdown files will be in `./localworkspace/markdowns/DOCUMENT_NAME` directory.
|
81 |
|
|
|
66 |
- Docker with GPU support [(NVIDIA Toolkit)](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
|
67 |
- Pre-downloaded model: [OCRFlux-3B](https://huggingface.co/ChatDOC/OCRFlux-3B)
|
68 |
|
69 |
+
To use OCRFlux in a docker container, you can use the following example command to start the docker container firstly:
|
70 |
|
71 |
```bash
|
72 |
docker run -it --gpus all \
|
73 |
-v /path/to/localworkspace:/localworkspace \
|
74 |
+
-v /path/to/test_pdf_dir:/test_pdf_dir \
|
75 |
-v /path/to/OCRFlux-3B:/OCRFlux-3B \
|
76 |
+
--entrypoint bash \
|
77 |
+
chatdoc/ocrflux:latest
|
78 |
```
|
79 |
|
80 |
+
and then run the following command on the docker container to parse document files:
|
81 |
+
|
82 |
+
```bash
|
83 |
+
python3.12 -m ocrflux.pipeline /localworkspace/ocrflux_results --data /test_pdf_dir/* --model /OCRFlux-3B/
|
84 |
+
```
|
85 |
+
|
86 |
+
The parsing results will be stored in `/localworkspace/ocrflux_results` directory.
|
87 |
+
|
88 |
+
|
89 |
#### Viewing Results
|
90 |
Generate the final Markdown files by running the following command. Generated Markdown files will be in `./localworkspace/markdowns/DOCUMENT_NAME` directory.
|
91 |
|