You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**GOCR2ImageReader** is a new class designed to read images using the [**GOCR-2.0** OCR engine](https://github.com/Ucas-HaoranWei/GOT-OCR2.0).
8
+
- This reader is initialized with an endpoint that defaults to `http://localhost:8881/ai/infer/` for the OCR service, but can be configured through an environment variable `GOCR2_ENDPOINT` or passed explicitly.
9
+
- It uses exponential backoff retry mechanisms to ensure robustness during API calls.
10
+
- Supports loading image files and extracting their text content, returning structured document data.
11
+
12
+
#### Setup
13
+
14
+
- We provide the docker image, with fastapi for serving the GOT-OCR2.0. Pull the image from:
15
+
16
+
```bash
17
+
docker run -d --gpus all -p 8881:8881 ghcr.io/phv2312/got-ocr2.0:main
18
+
```
19
+
20
+
- Detail implementation is placed at [ocr_loader.py](/libs/kotaemon/kotaemon/loaders/ocr_loader.py)
21
+
22
+
### 2. **Extension Manager**
23
+
24
+
- ExtensionManager allows users to dynamically manage multiple loaders for different file types.
25
+
26
+
- Users can switch between multiple loaders for the same file extension, such as using the GOCR2ImageReader or a
27
+
different unstructured data parser for .png files. This provides the flexibility to choose the best-suited loader for the task at hand.
28
+
29
+
- To change the default loader, go to **Settings**, then **Extension settings**. It displays a grid of extensions and
30
+
its supported loaders. Any modification will be saved to DB as other settings do.
0 commit comments