qubvel-hf HF staff commited on
Commit
3add5ad
1 Parent(s): 5b96eb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -248,10 +248,12 @@ def update_augmented_images(image, code):
248
  try:
249
  augmentation = eval(code)
250
  except ValidationError as e:
 
 
251
  logger.info(code)
252
  logger.error(e)
253
- raise gr.Error(str(e))
254
-
255
  track_event("transform_applied", properties={"transform_name": augmentation.__class__.__name__, "code": code})
256
 
257
  compose = A.Compose(
 
248
  try:
249
  augmentation = eval(code)
250
  except ValidationError as e:
251
+ raise gr.Error(str(e))
252
+ except Exception as e:
253
  logger.info(code)
254
  logger.error(e)
255
+ raise e
256
+
257
  track_event("transform_applied", properties={"transform_name": augmentation.__class__.__name__, "code": code})
258
 
259
  compose = A.Compose(