lichorosario commited on
Commit
a01682c
·
1 Parent(s): 6cdc812

feat: Habilitar aumento de resolución de imágenes con valores fijos

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -67,7 +67,8 @@ def update_selection(evt: gr.SelectData):
67
 
68
  def upscale(image, resolution, inf_steps, strength, hdr_effect, guidance_scale):
69
  client = Client("gokaygokay/Tile-Upscaler")
70
- result = client.predict(
 
71
  param_0=handle_file(image),
72
  param_1=resolution,
73
  param_2=inf_steps,
@@ -75,9 +76,10 @@ def upscale(image, resolution, inf_steps, strength, hdr_effect, guidance_scale):
75
  param_4=hdr_effect,
76
  param_5=guidance_scale,
77
  api_name="/wrapper"
78
- )
79
- return[image, image]
80
- return result
 
81
 
82
  css="""
83
  """
 
67
 
68
  def upscale(image, resolution, inf_steps, strength, hdr_effect, guidance_scale):
69
  client = Client("gokaygokay/Tile-Upscaler")
70
+ try:
71
+ result = client.predict(
72
  param_0=handle_file(image),
73
  param_1=resolution,
74
  param_2=inf_steps,
 
76
  param_4=hdr_effect,
77
  param_5=guidance_scale,
78
  api_name="/wrapper"
79
+ )
80
+ return result
81
+ except Exception as e:
82
+ gr.Alert("Error: " + str(e))
83
 
84
  css="""
85
  """