Turing311 commited on
Commit
eeeb45a
·
1 Parent(s): f2ee378
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -156,12 +156,13 @@ def ocr_barcode():
156
  ocrResult = TTVOcrBarCode(file_path.encode('utf-8'))
157
  status = "ok"
158
  if not ocrResult:
159
- ocrResDict = ""
160
  status = "error"
161
  else:
162
  ocrResDict = json.loads(ocrResult)
163
 
164
  response = jsonify({"status": status, "data": ocrResDict})
 
165
 
166
  os.remove(file_path)
167
 
 
156
  ocrResult = TTVOcrBarCode(file_path.encode('utf-8'))
157
  status = "ok"
158
  if not ocrResult:
159
+ ocrResDict = {}
160
  status = "error"
161
  else:
162
  ocrResDict = json.loads(ocrResult)
163
 
164
  response = jsonify({"status": status, "data": ocrResDict})
165
+ print("@@@@@", response)
166
 
167
  os.remove(file_path)
168