Update modeling_deepseekocr.py
Browse files- modeling_deepseekocr.py +6 -6
modeling_deepseekocr.py
CHANGED
|
@@ -27,12 +27,12 @@ import time
|
|
| 27 |
def load_image(image_path):
|
| 28 |
|
| 29 |
try:
|
| 30 |
-
dummy_img = Image.new("RGB", (640, 640), color="white")
|
| 31 |
-
ioBuff = BytesIO()
|
| 32 |
-
dummy_img.save(ioBuff, format="PNG")
|
| 33 |
-
ioBuff.seek(0)
|
| 34 |
-
image = Image.open(ioBuff)
|
| 35 |
-
|
| 36 |
|
| 37 |
corrected_image = ImageOps.exif_transpose(image)
|
| 38 |
|
|
|
|
| 27 |
def load_image(image_path):
|
| 28 |
|
| 29 |
try:
|
| 30 |
+
#dummy_img = Image.new("RGB", (640, 640), color="white")
|
| 31 |
+
#ioBuff = BytesIO()
|
| 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)
|
| 38 |
|