Spaces:
Configuration error
Configuration error
archas
commited on
docs: correct multipart/form-data curl example (#33)
Browse filesSigned-off-by: archasek <[email protected]>
README.md
CHANGED
@@ -8,10 +8,10 @@ The API provides two endpoints: one for urls, one for files. This is necessary t
|
|
8 |
|
9 |
### Common parameters
|
10 |
|
11 |
-
On top of the source of file (see below), both endpoints support the same parameters, which are the same as the Docling CLI.
|
12 |
|
13 |
- `from_format` (List[str]): Input format(s) to convert from. Allowed values: `docx`, `pptx`, `html`, `image`, `pdf`, `asciidoc`, `md`. Defaults to all formats.
|
14 |
-
- `
|
15 |
- `do_ocr` (bool): If enabled, the bitmap content will be processed using OCR. Defaults to `True`.
|
16 |
- `image_export_mode`: Image export mode for the document (only in case of JSON, Markdown or HTML). Allowed values: embedded, placeholder, referenced. Optional, defaults to `embedded`.
|
17 |
- `force_ocr` (bool): If enabled, replace any existing text with OCR-generated text over the full content. Defaults to `False`.
|
@@ -192,14 +192,17 @@ curl -X 'POST' \
|
|
192 |
-H 'Content-Type: multipart/form-data' \
|
193 |
-F 'ocr_engine=easyocr' \
|
194 |
-F 'pdf_backend=dlparse_v2' \
|
195 |
-
-F 'from_formats=pdf
|
|
|
196 |
-F 'force_ocr=false' \
|
197 |
-F 'image_export_mode=embedded' \
|
198 |
-
-F 'ocr_lang=
|
|
|
199 |
-F 'table_mode=fast' \
|
200 |
-F '[email protected];type=application/pdf' \
|
201 |
-F 'abort_on_error=false' \
|
202 |
-F 'to_formats=md' \
|
|
|
203 |
-F 'return_as_file=false' \
|
204 |
-F 'do_ocr=true'
|
205 |
```
|
|
|
8 |
|
9 |
### Common parameters
|
10 |
|
11 |
+
On top of the source of file (see below), both endpoints support the same parameters, which are almost the same as the Docling CLI.
|
12 |
|
13 |
- `from_format` (List[str]): Input format(s) to convert from. Allowed values: `docx`, `pptx`, `html`, `image`, `pdf`, `asciidoc`, `md`. Defaults to all formats.
|
14 |
+
- `to_formats` (List[str]): Output format(s) to convert to. Allowed values: `md`, `json`, `html`, `text`, `doctags`. Defaults to `md`.
|
15 |
- `do_ocr` (bool): If enabled, the bitmap content will be processed using OCR. Defaults to `True`.
|
16 |
- `image_export_mode`: Image export mode for the document (only in case of JSON, Markdown or HTML). Allowed values: embedded, placeholder, referenced. Optional, defaults to `embedded`.
|
17 |
- `force_ocr` (bool): If enabled, replace any existing text with OCR-generated text over the full content. Defaults to `False`.
|
|
|
192 |
-H 'Content-Type: multipart/form-data' \
|
193 |
-F 'ocr_engine=easyocr' \
|
194 |
-F 'pdf_backend=dlparse_v2' \
|
195 |
+
-F 'from_formats=pdf' \
|
196 |
+
-F 'from_formats=docx' \
|
197 |
-F 'force_ocr=false' \
|
198 |
-F 'image_export_mode=embedded' \
|
199 |
+
-F 'ocr_lang=en' \
|
200 |
+
-F 'ocr_lang=pl' \
|
201 |
-F 'table_mode=fast' \
|
202 |
-F '[email protected];type=application/pdf' \
|
203 |
-F 'abort_on_error=false' \
|
204 |
-F 'to_formats=md' \
|
205 |
+
-F 'to_formats=text' \
|
206 |
-F 'return_as_file=false' \
|
207 |
-F 'do_ocr=true'
|
208 |
```
|