afondiel commited on
Commit
e31102e
1 Parent(s): fb7ce20

fix render factor default type

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def colorizer_fn(input_img, render_factor):
51
  if input_img is not None and input_img != '':
52
  output_img = _colorizer.get_transformed_image(
53
  path=input_img,
54
- render_factor=int(render_factor),
55
  watermarked=watermarked,
56
  post_process=True,
57
  )
@@ -66,7 +66,7 @@ examples = [["./demo.jpg"],]
66
 
67
  demo = gr.Interface(
68
  fn=colorizer_fn,
69
- inputs=[gr.Image(type="filepath", label="Old image"), gr.Slider(0, 40, label="Render Factor", value=10)],
70
  outputs=ImageSlider(type="pil", label="Old vs Colored image"),
71
  examples=examples,
72
  title=title,
 
51
  if input_img is not None and input_img != '':
52
  output_img = _colorizer.get_transformed_image(
53
  path=input_img,
54
+ render_factor=render_factor,
55
  watermarked=watermarked,
56
  post_process=True,
57
  )
 
66
 
67
  demo = gr.Interface(
68
  fn=colorizer_fn,
69
+ inputs=[gr.Image(type="filepath", label="Old image"), gr.Slider(minimum=0, maximum=40, step=1, label="Render Factor", value=10)],
70
  outputs=ImageSlider(type="pil", label="Old vs Colored image"),
71
  examples=examples,
72
  title=title,