Lisandro commited on
Commit
463cc66
1 Parent(s): ded4cf1

feat: Update gradio_process_image to use uploaded image instead of fixed URL

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,7 +8,8 @@ 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('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'), param_1=resolution,
 
12
  param_2=num_inference_steps,
13
  param_3=strength,
14
  param_4=hdr,
@@ -17,9 +18,8 @@ def gradio_process_image(image, resolution, num_inference_steps, strength, hdr,
17
  param_7=scheduler_name,
18
  api_name="/wrapper"
19
  )
20
- # return result
21
- return image
22
-
23
 
24
  with gr.Blocks() as demo:
25
  with gr.Row():
 
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.name),
12
+ param_1=resolution,
13
  param_2=num_inference_steps,
14
  param_3=strength,
15
  param_4=hdr,
 
18
  param_7=scheduler_name,
19
  api_name="/wrapper"
20
  )
21
+ return result
22
+
 
23
 
24
  with gr.Blocks() as demo:
25
  with gr.Row():