rakib72642 commited on
Commit
80b06cc
·
1 Parent(s): 0816a09

fix rectangle

Browse files
Files changed (1) hide show
  1. ocr_main.py +2 -2
ocr_main.py CHANGED
@@ -22,7 +22,7 @@ async def detection(model,img_content):
22
  try:
23
  img = Image.open(img_content)
24
  # result = model(img)
25
- result = model(img,device=0)
26
 
27
  detection = {}
28
  data = json.loads(result[0].tojson())
@@ -102,7 +102,7 @@ async def mainDet(url):
102
  img_data = await asyncio.create_task(share_iamge(img))
103
  result = {
104
  "tabularData":{} if len(tab_data)==0 else tab_data,
105
- "imageData":{} if img_data == None else img_data,
106
  }
107
  return json.dumps(result)
108
 
 
22
  try:
23
  img = Image.open(img_content)
24
  # result = model(img)
25
+ result = model(img,device=0,conf=0.6)
26
 
27
  detection = {}
28
  data = json.loads(result[0].tojson())
 
102
  img_data = await asyncio.create_task(share_iamge(img))
103
  result = {
104
  "tabularData":{} if len(tab_data)==0 else tab_data,
105
+ "imageData":{} # if len(tab_data)==0 else img_data,
106
  }
107
  return json.dumps(result)
108