Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def detect_text_lines(image):
|
|
22 |
original_image = image.copy()
|
23 |
|
24 |
# Run YOLO text detection
|
25 |
-
results = model.predict(image, conf=0.4,
|
26 |
detected_boxes = results[0].boxes.xyxy.tolist()
|
27 |
class_ids = results[0].boxes.cls.tolist()
|
28 |
detected_boxes = [list(map(int, box)) for box in detected_boxes]
|
|
|
22 |
original_image = image.copy()
|
23 |
|
24 |
# Run YOLO text detection
|
25 |
+
results = model.predict(image, conf=0.4, device="cpu")
|
26 |
detected_boxes = results[0].boxes.xyxy.tolist()
|
27 |
class_ids = results[0].boxes.cls.tolist()
|
28 |
detected_boxes = [list(map(int, box)) for box in detected_boxes]
|