Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,7 +63,7 @@ pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
|
| 63 |
pipe.enable_attention_slicing()
|
| 64 |
|
| 65 |
# Generate 10 images
|
| 66 |
-
def generate_outfits(input_image, n=
|
| 67 |
prompt = "fashion outfit design inspired by the clothing item"
|
| 68 |
init_image = input_image.resize((512, 512))
|
| 69 |
generated_images = []
|
|
@@ -90,7 +90,7 @@ def recommend_from_upload(uploaded_image):
|
|
| 90 |
similar_imgs, query_vec = find_similar(uploaded_image, top_k=3, exclude_index=closest_idx)
|
| 91 |
|
| 92 |
# Generate 10 new outfits
|
| 93 |
-
|
| 94 |
|
| 95 |
|
| 96 |
# Select best match
|
|
|
|
| 63 |
pipe.enable_attention_slicing()
|
| 64 |
|
| 65 |
# Generate 10 images
|
| 66 |
+
def generate_outfits(input_image, n=1):
|
| 67 |
prompt = "fashion outfit design inspired by the clothing item"
|
| 68 |
init_image = input_image.resize((512, 512))
|
| 69 |
generated_images = []
|
|
|
|
| 90 |
similar_imgs, query_vec = find_similar(uploaded_image, top_k=3, exclude_index=closest_idx)
|
| 91 |
|
| 92 |
# Generate 10 new outfits
|
| 93 |
+
generated_imgs = generate_outfits(uploaded_image, n=1)
|
| 94 |
|
| 95 |
|
| 96 |
# Select best match
|