Lisandro commited on
Commit
0822f19
1 Parent(s): e4535af

Refactor app.py to remove unused code, improve code structure, and add prediction functionality

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -7,17 +7,17 @@ tile_upscaler_url = "gokaygokay/TileUpscalerV2"
7
  client_tile_upscaler = Client(tile_upscaler_url)
8
 
9
  def gradio_process_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
10
- # result = client_tile_upscaler.predict(
11
- # param_0=handle_file(image),
12
- # param_1=resolution,
13
- # param_2=num_inference_steps,
14
- # param_3=strength,
15
- # param_4=hdr,
16
- # param_5=guidance_scale,
17
- # param_6=controlnet_strength,
18
- # param_7=scheduler_name,
19
- # api_name="/wrapper"
20
- # )
21
  # return result
22
  return image
23
 
 
7
  client_tile_upscaler = Client(tile_upscaler_url)
8
 
9
  def gradio_process_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
10
+ result = client_tile_upscaler.predict(
11
+ param_0=handle_file(image),
12
+ param_1=resolution,
13
+ param_2=num_inference_steps,
14
+ param_3=strength,
15
+ param_4=hdr,
16
+ param_5=guidance_scale,
17
+ param_6=controlnet_strength,
18
+ param_7=scheduler_name,
19
+ api_name="/wrapper"
20
+ )
21
  # return result
22
  return image
23