Zeph27 commited on
Commit
f740bd4
1 Parent(s): 65d31f7

raise error

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -48,7 +48,10 @@ def process_image(input_image, scale_factor):
48
 
49
  @spaces.GPU
50
  def process_image_on_gpu(pil_image):
51
- return aura_sr.upscale_4x(pil_image)
 
 
 
52
 
53
  with gr.Blocks() as demo:
54
  gr.Markdown("# Image Upscaler")
 
48
 
49
  @spaces.GPU
50
  def process_image_on_gpu(pil_image):
51
+ try:
52
+ return aura_sr.upscale_4x(pil_image)
53
+ except Exception as e:
54
+ raise gr.Error(f"An error occurred during image upscaling: {str(e)}")
55
 
56
  with gr.Blocks() as demo:
57
  gr.Markdown("# Image Upscaler")