优化ucloud取文件为空时的判断
This commit is contained in:
@@ -38,6 +38,8 @@ def information_extraction(ie, phrecs):
|
||||
if pic_path:
|
||||
docs.append({"doc": pic_path})
|
||||
doc_phrecs.append(phrec)
|
||||
if not docs:
|
||||
return result
|
||||
ie_results = ie(docs)
|
||||
|
||||
now = get_default_datetime()
|
||||
|
||||
@@ -13,8 +13,8 @@ from ucloud import ucloud
|
||||
|
||||
|
||||
def write_visual_result(image, layout=None, result=None):
|
||||
img = re.split(r'[\\/]', image)[-1]
|
||||
img = img.split("?")[0]
|
||||
img = image.split("?")[0]
|
||||
img = re.split(r'[\\/]', img)[-1]
|
||||
img_name = ""
|
||||
img_type = "jpg"
|
||||
last_dot_index = img.rfind(".")
|
||||
|
||||
Reference in New Issue
Block a user