selfitcamera commited on
Commit
f7f38e1
1 Parent(s): 341af28
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +3 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def onClick(cloth_id, pose_image, pose_id, size, request: gr.Request):
15
  res = get_result_example(cloth_id, pose_id)
16
  print(res)
17
  assert os.path.exists(res), res
18
- res = cv2.imread(res)
19
  return res, "Done! Use the pre-run results directly, the cloth size does not take effect "
20
  else:
21
  try:
@@ -134,8 +134,8 @@ with gr.Blocks(css=css) as demo:
134
  with gr.Column():
135
  run_button = gr.Button(value="Run")
136
  init_res = get_result_example(cloth_examples[0][0], pose_examples[0][0])
137
- # res_image = gr.Image(label="result image", value=None, type="filepath")
138
- res_image = gr.Image(label="result image", value=None, type="numpy")
139
  # res_image = gr.Image(label="result image", value=cv2.imread(init_res),
140
  # type="numpy")
141
  info_text = gr.Textbox(value="", interactive=False,
 
15
  res = get_result_example(cloth_id, pose_id)
16
  print(res)
17
  assert os.path.exists(res), res
18
+ # res = cv2.imread(res)
19
  return res, "Done! Use the pre-run results directly, the cloth size does not take effect "
20
  else:
21
  try:
 
134
  with gr.Column():
135
  run_button = gr.Button(value="Run")
136
  init_res = get_result_example(cloth_examples[0][0], pose_examples[0][0])
137
+ res_image = gr.Image(label="result image", value=None, type="filepath")
138
+ # res_image = gr.Image(label="result image", value=None, type="numpy")
139
  # res_image = gr.Image(label="result image", value=cv2.imread(init_res),
140
  # type="numpy")
141
  info_text = gr.Textbox(value="", interactive=False,
requirements.txt CHANGED
@@ -1,4 +1,6 @@
1
  opencv-python
2
  numpy
3
  requests
4
- gradio==4.19.1
 
 
 
1
  opencv-python
2
  numpy
3
  requests
4
+ gradio==3.41.2
5
+ gradio-client==0.5.0
6
+