Skip to content

Commit 0dcf5d1

Browse files
committed
Fix errors
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
1 parent 885eb2e commit 0dcf5d1

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
7878
# A modern version of cargo is needed for the latest version of the Rust compiler.
7979
RUN apt update && apt install -y curl build-essential \
8080
&& if [ "$NEED_MIRROR" == "1" ]; then \
81-
# Use TUNA mirrors for rustup/rust dist files
81+
# Use TUNA mirrors for rustup/rust dist files \
8282
export RUSTUP_DIST_SERVER="https://mirrors.tuna.tsinghua.edu.cn/rustup"; \
8383
export RUSTUP_UPDATE_ROOT="https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup"; \
8484
echo "Using TUNA mirrors for Rustup."; \
8585
fi; \
86-
# Force curl to use HTTP/1.1
86+
# Force curl to use HTTP/1.1 \
8787
curl --proto '=https' --tlsv1.2 --http1.1 -sSf https://sh.rustup.rs | bash -s -- -y --profile minimal \
8888
&& echo 'export PATH="/root/.cargo/bin:${PATH}"' >> /root/.bashrc
8989

deepdoc/vision/ocr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def __init__(self, model_dir=None):
582582
self.crop_image_res_index = 0
583583

584584
def get_rotate_crop_image(self, img, points):
585-
'''
585+
"""
586586
img_height, img_width = img.shape[0:2]
587587
left = int(np.min(points[:, 0]))
588588
right = int(np.max(points[:, 0]))
@@ -591,7 +591,7 @@ def get_rotate_crop_image(self, img, points):
591591
img_crop = img[top:bottom, left:right, :].copy()
592592
points[:, 0] = points[:, 0] - left
593593
points[:, 1] = points[:, 1] - top
594-
'''
594+
"""
595595
assert len(points) == 4, "shape of points must be 4*2"
596596
img_crop_width = int(
597597
max(

deepdoc/vision/postprocess.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def __init__(self,
6767
[[1, 1], [1, 1]])
6868

6969
def polygons_from_bitmap(self, pred, _bitmap, dest_width, dest_height):
70-
'''
70+
"""
7171
_bitmap: single map with shape (1, H, W),
7272
whose values are binarized as {0, 1}
73-
'''
73+
"""
7474

7575
bitmap = _bitmap
7676
height, width = bitmap.shape
@@ -114,10 +114,10 @@ def polygons_from_bitmap(self, pred, _bitmap, dest_width, dest_height):
114114
return boxes, scores
115115

116116
def boxes_from_bitmap(self, pred, _bitmap, dest_width, dest_height):
117-
'''
117+
"""
118118
_bitmap: single map with shape (1, H, W),
119119
whose values are binarized as {0, 1}
120-
'''
120+
"""
121121

122122
bitmap = _bitmap
123123
height, width = bitmap.shape
@@ -192,9 +192,9 @@ def get_mini_boxes(self, contour):
192192
return box, min(bounding_box[1])
193193

194194
def box_score_fast(self, bitmap, _box):
195-
'''
195+
"""
196196
box_score_fast: use bbox mean score as the mean score
197-
'''
197+
"""
198198
h, w = bitmap.shape[:2]
199199
box = _box.copy()
200200
xmin = np.clip(np.floor(box[:, 0].min()).astype("int32"), 0, w - 1)
@@ -209,9 +209,9 @@ def box_score_fast(self, bitmap, _box):
209209
return cv2.mean(bitmap[ymin:ymax + 1, xmin:xmax + 1], mask)[0]
210210

211211
def box_score_slow(self, bitmap, contour):
212-
'''
213-
box_score_slow: use polyon mean score as the mean score
214-
'''
212+
"""
213+
box_score_slow: use polygon mean score as the mean score
214+
"""
215215
h, w = bitmap.shape[:2]
216216
contour = contour.copy()
217217
contour = np.reshape(contour, (-1, 2))

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
2626
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
2727

28-
# Example configration to start Admin server:
28+
# Example configuration to start Admin server:
2929
# command:
3030
# - --enable-adminserver
3131
ports:
@@ -74,7 +74,7 @@ services:
7474
# - --no-transport-streamable-http-enabled # Disable Streamable HTTP transport (/mcp endpoint)
7575
# - --no-json-response # Disable JSON response mode in Streamable HTTP transport (instead of SSE over HTTP)
7676

77-
# Example configration to start Admin server:
77+
# Example configuration to start Admin server:
7878
# command:
7979
# - --enable-adminserver
8080
ports:

example/sdk/dataset_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# limitations under the License.
1515
#
1616

17-
'''
17+
"""
1818
The example is about CRUD operations (Create, Read, Update, Delete) on a dataset.
19-
'''
19+
"""
2020

2121
from ragflow_sdk import RAGFlow
2222
import sys

0 commit comments

Comments
 (0)