lixiang46 commited on
Commit
fa6131f
1 Parent(s): 04ee7e7
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -42,10 +42,10 @@ def start_tryon(person_img, garment_img, seed, randomize_seed):
42
  result_img = cv2.cvtColor(result_img, cv2.COLOR_RGB2BGR)
43
  info = "Success"
44
  else:
45
- print(response.json()['result'])
46
  info = "Try again latter"
47
  else:
48
- print(response.json()['result'])
49
  info = "URL error, pleace contact the admin"
50
 
51
  return result_img, seed, info
@@ -108,7 +108,7 @@ with gr.Blocks(css=css) as Tryon:
108
  examples_per_page=12,
109
  examples=garm_list_path)
110
  with gr.Column(elem_id = "col-right"):
111
- image_out = gr.Image(label="Output", show_share_button=False)
112
  with gr.Row():
113
  seed = gr.Slider(
114
  label="Seed",
@@ -119,7 +119,7 @@ with gr.Blocks(css=css) as Tryon:
119
  )
120
  randomize_seed = gr.Checkbox(label="Random seed", value=True)
121
  with gr.Row():
122
- seed_used = gr.Number(label="Seed Used")
123
  result_info = gr.Text(label="Response")
124
  try_button = gr.Button(value="Run", elem_id="button")
125
 
 
42
  result_img = cv2.cvtColor(result_img, cv2.COLOR_RGB2BGR)
43
  info = "Success"
44
  else:
45
+ print(response.text)
46
  info = "Try again latter"
47
  else:
48
+ print(response.text)
49
  info = "URL error, pleace contact the admin"
50
 
51
  return result_img, seed, info
 
108
  examples_per_page=12,
109
  examples=garm_list_path)
110
  with gr.Column(elem_id = "col-right"):
111
+ image_out = gr.Image(label="Result", show_share_button=False)
112
  with gr.Row():
113
  seed = gr.Slider(
114
  label="Seed",
 
119
  )
120
  randomize_seed = gr.Checkbox(label="Random seed", value=True)
121
  with gr.Row():
122
+ seed_used = gr.Number(label="Seed used")
123
  result_info = gr.Text(label="Response")
124
  try_button = gr.Button(value="Run", elem_id="button")
125