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