Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -245,7 +245,11 @@ def update_augmented_images(image, code):
|
|
245 |
if "=," in code:
|
246 |
raise gr.Error("You have to fill in some parameters to apply transform!")
|
247 |
|
248 |
-
|
|
|
|
|
|
|
|
|
249 |
track_event("transform_applied", properties={"transform_name": augmentation.__class__.__name__, "code": code})
|
250 |
|
251 |
compose = A.Compose(
|
|
|
245 |
if "=," in code:
|
246 |
raise gr.Error("You have to fill in some parameters to apply transform!")
|
247 |
|
248 |
+
try:
|
249 |
+
augmentation = eval(code)
|
250 |
+
except ValidationError as e:
|
251 |
+
gr.Error(str(e))
|
252 |
+
|
253 |
track_event("transform_applied", properties={"transform_name": augmentation.__class__.__name__, "code": code})
|
254 |
|
255 |
compose = A.Compose(
|