|
|
@@ -62,8 +62,8 @@ pip install magic-pdf[full] detectron2 --extra-index-url https://wheels.myhloli.
|
|
|
## 8. 第一次运行前的配置
|
|
|
在仓库根目录可以获得 [magic-pdf.template.json](../magic-pdf.template.json) 配置模版文件
|
|
|
> ❗️务必执行以下命令将配置文件拷贝到【用户目录】下,否则程序将无法运行
|
|
|
->
|
|
|
-> windows的用户目录为 "C:\Users\用户名", linux用户目录为 "/home/用户名", macOS用户目录为 "/Users/用户名"
|
|
|
+>
|
|
|
+> linux用户目录为 "/home/用户名"
|
|
|
```bash
|
|
|
cp magic-pdf.template.json ~/magic-pdf.json
|
|
|
```
|
|
|
@@ -71,7 +71,6 @@ cp magic-pdf.template.json ~/magic-pdf.json
|
|
|
在用户目录中找到magic-pdf.json文件并配置"models-dir"为[7. 下载模型](#7-下载模型)中下载的模型权重文件所在目录
|
|
|
> ❗️务必正确配置模型权重文件所在目录,否则会因为找不到模型文件而导致程序无法运行
|
|
|
>
|
|
|
-> windows系统中应把路径中所有的"\\"替换为"/",否则会因为转义原因导致json文件语法错误。
|
|
|
```json
|
|
|
{
|
|
|
"models-dir": "/tmp/models"
|