Men1scus commited on
Commit
a900a9e
·
1 Parent(s): 432a73c

fix: Update error handling in process_sr function to allow for custom duration in inference errors

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -376,7 +376,7 @@ def process_sr(
376
  if resize_flag:
377
  image = image.resize((ori_width * rscale, ori_height * rscale))
378
  except Exception as e:
379
- raise gr.Error(f"Error during inference: {e}")
380
  print(f"Error during inference: {e}")
381
  image = Image.new(mode="RGB", size=(512, 512))
382
 
 
376
  if resize_flag:
377
  image = image.resize((ori_width * rscale, ori_height * rscale))
378
  except Exception as e:
379
+ raise gr.Error(f"Error during inference: {e}", duration=None)
380
  print(f"Error during inference: {e}")
381
  image = Image.new(mode="RGB", size=(512, 512))
382