mbuckle commited on
Commit
2b5a39a
·
1 Parent(s): 43267ee

Minimal test version 2

Browse files
Files changed (1) hide show
  1. minimal_test_paddle.py +3 -1
minimal_test_paddle.py CHANGED
@@ -76,7 +76,9 @@ def test_ocr():
76
  if result and result[0]:
77
  for detection in result[0]:
78
  if len(detection) >= 2:
79
- text_found += detection[1][0] + "\n"
 
 
80
 
81
  print(json.dumps({
82
  "success": True,
 
76
  if result and result[0]:
77
  for detection in result[0]:
78
  if len(detection) >= 2:
79
+ # Convert to string to handle both string and float values
80
+ text_value = str(detection[1][0]) if isinstance(detection[1], (list, tuple)) else str(detection[1])
81
+ text_found += text_value + "\n"
82
 
83
  print(json.dumps({
84
  "success": True,