Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ from copy import deepcopy
|
|
13 |
from functools import wraps
|
14 |
from PIL import Image, ImageDraw
|
15 |
from typing import get_type_hints, Optional
|
|
|
16 |
# from mixpanel import Mixpanel
|
17 |
|
18 |
from utils import is_not_supported_transform
|
@@ -136,7 +137,7 @@ def run_with_retry(compose):
|
|
136 |
compose.processors.pop("keypoints")
|
137 |
if "mask" in str(e):
|
138 |
kwargs.pop("mask", None)
|
139 |
-
except ValueError as e:
|
140 |
raise gr.Error(str(e))
|
141 |
except Exception as e:
|
142 |
compose.processors = processors
|
|
|
13 |
from functools import wraps
|
14 |
from PIL import Image, ImageDraw
|
15 |
from typing import get_type_hints, Optional
|
16 |
+
from pydantic_core._pydantic_core import ValidationError
|
17 |
# from mixpanel import Mixpanel
|
18 |
|
19 |
from utils import is_not_supported_transform
|
|
|
137 |
compose.processors.pop("keypoints")
|
138 |
if "mask" in str(e):
|
139 |
kwargs.pop("mask", None)
|
140 |
+
except (ValueError, ValidationError) as e:
|
141 |
raise gr.Error(str(e))
|
142 |
except Exception as e:
|
143 |
compose.processors = processors
|