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

add .heic image file support #356

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This repo implements a pre-processing pipeline for the following documents. Curr
| Category | Document Types |
|-----------|-------------------------------|
| Plaintext | `.txt`, `.eml`, `.msg`, `.xml`, `.html`, `.md`, `.rst`, `.json`, `.rtf` |
| Images | `.jpeg`, `.png` |
| Images | `.jpeg`, `.png`, `.heic` |
| Documents | `.doc`, `.docx`, `.ppt`, `.pptx`, `.pdf`, `.odt`, `.epub`, `.csv`, `.tsv`, `.xlsx` |
| Zipped | `.gz` |

Expand Down Expand Up @@ -149,7 +149,7 @@ To extract the table structure from PDF files using the `hi_res` strategy, ensur
#### Skip Table Extraction

Currently, we provide support for enabling and disabling table extraction for file types other than PDF files. Set parameter `skip_infer_table_types` to specify the document types that you want to skip table extraction with. By default, we skip table extraction
for PDFs and Images, which are `pdf`, `jpg` and `png`. Again, please note that table extraction only works with `hi_res` strategy. For example, if you don't want to skip table extraction for images, you can pass an empty value to `skip_infer_table_types` with:
for PDFs and Images, which are `pdf`, `jpg`, `heic`, and `png`. Again, please note that table extraction only works with `hi_res` strategy. For example, if you don't want to skip table extraction for images, you can pass an empty value to `skip_infer_table_types` with:

```
curl -X 'POST' \
Expand Down
2 changes: 1 addition & 1 deletion prepline_general/api/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def is_compatible_response_type(media_type: str, response_type: type) -> bool:


DEFAULT_MIMETYPES = (
"application/pdf,application/msword,image/jpeg,image/png,text/markdown,"
"application/pdf,application/msword,image/jpeg,image/png,image/heic,text/markdown,"
"text/x-markdown,text/html,"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document,"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,"
Expand Down
Loading