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

feat: Update gradio_process_image to handle uploaded image directly

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,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.name),
12
  param_1=resolution,
13
  param_2=num_inference_steps,
14
  param_3=strength,
@@ -24,7 +24,7 @@ def gradio_process_image(image, resolution, num_inference_steps, strength, hdr,
24
  with gr.Blocks() as demo:
25
  with gr.Row():
26
  with gr.Column():
27
- input_image = gr.Image(label="Input Image")
28
  run_button = gr.Button("Enhance Image")
29
  with gr.Column():
30
  output_image = gr.Image(label="Output Image")
 
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,
 
24
  with gr.Blocks() as demo:
25
  with gr.Row():
26
  with gr.Column():
27
+ input_image = gr.Image(label="Input Image", type="filepath")
28
  run_button = gr.Button("Enhance Image")
29
  with gr.Column():
30
  output_image = gr.Image(label="Output Image")