Update pipeline/logic.py
Browse files- pipeline/logic.py +2 -0
pipeline/logic.py
CHANGED
|
@@ -5,6 +5,8 @@ from skimage import feature
|
|
| 5 |
from io import BytesIO
|
| 6 |
from PIL import Image
|
| 7 |
import torch
|
|
|
|
|
|
|
| 8 |
|
| 9 |
def get_canonical_label(object_name_phrase: str) -> str:
|
| 10 |
print(f"\n [Label] Extracting label for: '{object_name_phrase}'")
|
|
|
|
| 5 |
from io import BytesIO
|
| 6 |
from PIL import Image
|
| 7 |
import torch
|
| 8 |
+
from PIL import ImageFile
|
| 9 |
+
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
| 10 |
|
| 11 |
def get_canonical_label(object_name_phrase: str) -> str:
|
| 12 |
print(f"\n [Label] Extracting label for: '{object_name_phrase}'")
|