lichorosario commited on
Commit
fcd261f
1 Parent(s): bf86367

feat: Update app.py to use new Tile-Upscaler client

Browse files

The code changes in app.py update the `upscale` function to use a new client called `other_client` from the `gokaygokay/Tile-Upscaler` repository. This change replaces the commented out code that was using the previous client. The `upscale` function now calls the `predict` method of the `other_client` to perform image upscaling with the provided parameters.

Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -71,16 +71,16 @@ def update_selection(evt: gr.SelectData):
71
 
72
  def upscale(image, resolution, inf_steps, strength, hdr_effect, guidance_scale):
73
  try:
74
- # client = Client("gokaygokay/Tile-Upscaler")
75
- # result = client.predict(
76
- # param_0=handle_file(image),
77
- # param_1=resolution,
78
- # param_2=inf_steps,
79
- # param_3=strength,
80
- # param_4=hdr_effect,
81
- # param_5=guidance_scale,
82
- # api_name="/wrapper"
83
- # )
84
  return [image, image]
85
  return result
86
  except Exception as e:
 
71
 
72
  def upscale(image, resolution, inf_steps, strength, hdr_effect, guidance_scale):
73
  try:
74
+ other_client = Client("gokaygokay/Tile-Upscaler")
75
+ result = other_client.predict(
76
+ param_0=handle_file(image),
77
+ param_1=resolution,
78
+ param_2=inf_steps,
79
+ param_3=strength,
80
+ param_4=hdr_effect,
81
+ param_5=guidance_scale,
82
+ api_name="/wrapper"
83
+ )
84
  return [image, image]
85
  return result
86
  except Exception as e: