-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: integrate got-ocr2.0 as image reader #355
base: main
Are you sure you want to change the base?
Conversation
@phv2312, can you add a docker-compose file (allow choose the docker image for OCR service)? I think it will help people test more easily. |
25904f0
to
de703a3
Compare
Hi @taprosoft @cin-niko. Sorry for no update for long time. Can you help to review this PR again |
- We provide the docker image, with fastapi for serving the GOT-OCR2.0. Pull the image from: | ||
|
||
```bash | ||
docker run -d --gpus all -p 8881:8881 ghcr.io/phv2312/got-ocr2.0:main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the docker to Kotaemon ghcr if we use GOCR as the main OCR loader?
UnstructuredReader, | ||
) | ||
|
||
unstructured = UnstructuredReader() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistent naming (same as in files.py
): unstructured_reader
credential=str(config("AZURE_DI_CREDENTIAL", default="")), | ||
cache_dir=getattr(flowsettings, "KH_MARKDOWN_OUTPUT_DIR", None), | ||
) | ||
adobe_reader.vlm_endpoint = azure_reader.vlm_endpoint = getattr( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we pass vlm_endpoint
in __init__
(same as in files.py
)
|
||
raise Exception(f"can not find the selected loader for extension: {extension}") | ||
|
||
def generate_gradio_settings(self) -> dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, the logic related to gradio UI should be implemented in ktem.
Description
Type of change
Checklist