Akash James commited on
Commit
c9fd122
1 Parent(s): 1c5ae49

Default CUDA and Post Processing as True; Potential CPU fix

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -24,6 +24,8 @@ def run(content_img, style_img, cuda, post_processing, fast):
24
 
25
  if cuda:
26
  p_wct.cuda(0)
 
 
27
 
28
  output_img = process_stylization.stylization_gradio(
29
  stylization_module=p_wct,
@@ -43,8 +45,8 @@ if __name__ == '__main__':
43
  inputs=[
44
  gr.Image(label='Content Image'),
45
  gr.Image(label='Stylize Image'),
46
- gr.Checkbox(value=False, label='Use CUDA'),
47
- gr.Checkbox(value=False, label='Post Processing'),
48
  gr.Radio(choices=["Guided Image Filtering (Fast)", "Photorealisitic Smoothing (Slow)"], value="Guided Image Filtering (Fast)", type="index", label="Algorithm", interactive=False),
49
  ],
50
  outputs=[gr.Image(
 
24
 
25
  if cuda:
26
  p_wct.cuda(0)
27
+ else:
28
+ p_wct.to('cpu')
29
 
30
  output_img = process_stylization.stylization_gradio(
31
  stylization_module=p_wct,
 
45
  inputs=[
46
  gr.Image(label='Content Image'),
47
  gr.Image(label='Stylize Image'),
48
+ gr.Checkbox(value=True, label='Use CUDA'),
49
+ gr.Checkbox(value=True, label='Post Processing'),
50
  gr.Radio(choices=["Guided Image Filtering (Fast)", "Photorealisitic Smoothing (Slow)"], value="Guided Image Filtering (Fast)", type="index", label="Algorithm", interactive=False),
51
  ],
52
  outputs=[gr.Image(