Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -44,7 +44,7 @@ def extract_image_features(image):
|
|
| 44 |
# except Exception as e:
|
| 45 |
# print(f"Error extracting features: {e}")
|
| 46 |
# return None
|
| 47 |
-
|
| 48 |
# Convert NumPy array to PIL if needed
|
| 49 |
if isinstance(image, np.ndarray):
|
| 50 |
image = Image.fromarray(image.astype("uint8")).convert("RGB")
|
|
|
|
| 44 |
# except Exception as e:
|
| 45 |
# print(f"Error extracting features: {e}")
|
| 46 |
# return None
|
| 47 |
+
try:
|
| 48 |
# Convert NumPy array to PIL if needed
|
| 49 |
if isinstance(image, np.ndarray):
|
| 50 |
image = Image.fromarray(image.astype("uint8")).convert("RGB")
|