Update modeling_deepseekocr.py
Browse files- modeling_deepseekocr.py +3 -1
modeling_deepseekocr.py
CHANGED
|
@@ -32,6 +32,7 @@ def load_image(image_path):
|
|
| 32 |
#dummy_img.save(ioBuff, format="PNG")
|
| 33 |
#ioBuff.seek(0)
|
| 34 |
#image = Image.open(ioBuff)
|
|
|
|
| 35 |
image = Image.open(image_path)
|
| 36 |
|
| 37 |
corrected_image = ImageOps.exif_transpose(image)
|
|
@@ -40,7 +41,8 @@ def load_image(image_path):
|
|
| 40 |
|
| 41 |
except Exception as e:
|
| 42 |
print(f"error: {e}")
|
| 43 |
-
try
|
|
|
|
| 44 |
return Image.open(image_path)
|
| 45 |
except:
|
| 46 |
return None
|
|
|
|
| 32 |
#dummy_img.save(ioBuff, format="PNG")
|
| 33 |
#ioBuff.seek(0)
|
| 34 |
#image = Image.open(ioBuff)
|
| 35 |
+
print(f"image_path:",type(image_path))
|
| 36 |
image = Image.open(image_path)
|
| 37 |
|
| 38 |
corrected_image = ImageOps.exif_transpose(image)
|
|
|
|
| 41 |
|
| 42 |
except Exception as e:
|
| 43 |
print(f"error: {e}")
|
| 44 |
+
try
|
| 45 |
+
print(f"image_path:",type(image_path))
|
| 46 |
return Image.open(image_path)
|
| 47 |
except:
|
| 48 |
return None
|