ahmadsuyadi commited on
Commit
587b6a5
·
verified ·
1 Parent(s): 806a3a7

Update run/gradio_ootd.py

Browse files
Files changed (1) hide show
  1. run/gradio_ootd.py +3 -5
run/gradio_ootd.py CHANGED
@@ -1,5 +1,3 @@
1
- import spaces
2
-
3
  import gradio as gr
4
  import os
5
  from pathlib import Path
@@ -38,7 +36,7 @@ model_dc = os.path.join(example_path, 'model/model_8.png')
38
  garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')
39
 
40
 
41
- @spaces.GPU
42
  def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
43
  model_type = 'hd'
44
  category = 0 # 0:upperbody; 1:lowerbody; 2:dress
@@ -75,7 +73,7 @@ def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
75
 
76
  return images
77
 
78
- @spaces.GPU
79
  def process_dc(vton_img, garm_img, category, n_samples, n_steps, image_scale, seed):
80
  model_type = 'dc'
81
  if category == 'Upper-body':
@@ -271,4 +269,4 @@ with block:
271
  ips_dc = [vton_img_dc, garm_img_dc, category_dc, n_samples_dc, n_steps_dc, image_scale_dc, seed_dc]
272
  run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
273
 
274
- block.launch()
 
 
 
1
  import gradio as gr
2
  import os
3
  from pathlib import Path
 
36
  garment_dc = os.path.join(example_path, 'garment/048554_1.jpg')
37
 
38
 
39
+
40
  def process_hd(vton_img, garm_img, n_samples, n_steps, image_scale, seed):
41
  model_type = 'hd'
42
  category = 0 # 0:upperbody; 1:lowerbody; 2:dress
 
73
 
74
  return images
75
 
76
+
77
  def process_dc(vton_img, garm_img, category, n_samples, n_steps, image_scale, seed):
78
  model_type = 'dc'
79
  if category == 'Upper-body':
 
269
  ips_dc = [vton_img_dc, garm_img_dc, category_dc, n_samples_dc, n_steps_dc, image_scale_dc, seed_dc]
270
  run_button_dc.click(fn=process_dc, inputs=ips_dc, outputs=[result_gallery_dc])
271
 
272
+ block.launch(server_port=3024, server_name="0.0.0.0")