Skip to content

Commit 509adca

Browse files
Update dummy_ocr_agent.py
1 parent d5f4eeb commit 509adca

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

src/bisheng_unstructured/models/idp/dummy_ocr_agent.py

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
import copy
33
from dataclasses import dataclass
44
from typing import Any, List, Optional, Union
5-
<<<<<<< HEAD
5+
66
import numpy as np
77
import copy
8-
import requests
9-
=======
10-
118
import requests
129

13-
>>>>>>> 9d33ce52b5b0d99da95e2e50b476b644d55a8c4c
1410

1511
# 表示1个文本区域
1612
@dataclass
@@ -119,7 +115,7 @@ def __init__(self, **kwargs):
119115
def predict(self, inp) -> List[BlockInfo]:
120116
scene = inp.pop("scene", "print")
121117
b64_image = inp.pop("b64_image")
122-
<<<<<<< HEAD
118+
123119
params = copy.deepcopy(self.params)
124120
# params.update(self.scene_mapping[scene])
125121
params.update(inp)
@@ -189,26 +185,4 @@ def predict(self, inp) -> List[BlockInfo]:
189185
layout_type=0,
190186
)
191187
return [b0]
192-
=======
193-
# todo:
194-
195-
b0 = BlockInfo(
196-
bbox=[],
197-
block_text="abcdef",
198-
block_no=0,
199-
ts=["abc", "def"],
200-
rs=[[0, 0, 100, 30], [0, 50, 100, 80]],
201-
layout_type=4,
202-
)
203-
204-
b1 = BlockInfo(
205-
bbox=[],
206-
block_text="| h1 | h2 | h3 |\n|-|-|-|\n| data1 | data2 | data3 |",
207-
block_no=0,
208-
ts=[""],
209-
rs=[[0, 50, 100, 80]],
210-
layout_type=5,
211-
)
212-
213-
return [b0, b1]
214-
>>>>>>> 9d33ce52b5b0d99da95e2e50b476b644d55a8c4c
188+

0 commit comments

Comments
 (0)