Spaces:
Sleeping
Sleeping
Revert filepath to numpy and commented/removed garment1 convertion to img
Browse files
app.py
CHANGED
|
@@ -71,8 +71,8 @@ def get_tryon_result(model_name, garment1, garment2, seed=1234):
|
|
| 71 |
# model_name = "AI Model " + model_name.split("\\")[-1].split(".")[0] # windows
|
| 72 |
# model_name = "AI Model " + model_name.split("/")[-1].split(".")[0] # linux
|
| 73 |
# print(model_name)
|
| 74 |
-
garment1 = cv2.imread(garment1) # read path into numpy
|
| 75 |
-
garment1 = cv2.cvtColor(garment1, cv2.COLOR_BGR2RGB)
|
| 76 |
|
| 77 |
if not model_name.startswith("AI Model "):
|
| 78 |
model_name = "AI Model " + model_name.split("/")[-1].split(".")[0]
|
|
@@ -203,8 +203,8 @@ with gr.Blocks(css = ".output-image, .input-image, .image-preview {height: 400px
|
|
| 203 |
bottom_btn4 = gr.Button("Shorts", variant="secondary")
|
| 204 |
|
| 205 |
with gr.Row():
|
| 206 |
-
garment_top = gr.Image(sources='upload', type="
|
| 207 |
-
garment_down = gr.Image(sources='upload', type="
|
| 208 |
|
| 209 |
run_button = gr.Button(value="Run")
|
| 210 |
|
|
|
|
| 71 |
# model_name = "AI Model " + model_name.split("\\")[-1].split(".")[0] # windows
|
| 72 |
# model_name = "AI Model " + model_name.split("/")[-1].split(".")[0] # linux
|
| 73 |
# print(model_name)
|
| 74 |
+
# garment1 = cv2.imread(garment1) # read path into numpy
|
| 75 |
+
# garment1 = cv2.cvtColor(garment1, cv2.COLOR_BGR2RGB)
|
| 76 |
|
| 77 |
if not model_name.startswith("AI Model "):
|
| 78 |
model_name = "AI Model " + model_name.split("/")[-1].split(".")[0]
|
|
|
|
| 203 |
bottom_btn4 = gr.Button("Shorts", variant="secondary")
|
| 204 |
|
| 205 |
with gr.Row():
|
| 206 |
+
garment_top = gr.Image(sources='upload', type="numpy", label="top garment")
|
| 207 |
+
garment_down = gr.Image(sources='upload', type="numpy", label="lower garment")
|
| 208 |
|
| 209 |
run_button = gr.Button(value="Run")
|
| 210 |
|