Spaces:
Sleeping
Sleeping
fix: Map missing Unsplash images and replace 404s
Browse files
app.py
CHANGED
|
@@ -57,7 +57,9 @@ IMAGE_MAP = {
|
|
| 57 |
"Shoes": "https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=400&h=300&fit=crop",
|
| 58 |
"Jacket": "https://images.unsplash.com/photo-1551028719-00167b16eac5?w=400&h=300&fit=crop",
|
| 59 |
"Watch": "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400&h=300&fit=crop",
|
| 60 |
-
"Mat": "https://images.unsplash.com/photo-
|
|
|
|
|
|
|
| 61 |
"Headphones": "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400&h=300&fit=crop",
|
| 62 |
"Tracker": "https://images.unsplash.com/photo-1557438159-51eec7a6c9e8?w=400&h=300&fit=crop",
|
| 63 |
"Earbuds": "https://images.unsplash.com/photo-1590658268037-6bf12f032f55?w=400&h=300&fit=crop",
|
|
@@ -90,7 +92,7 @@ IMAGE_MAP = {
|
|
| 90 |
"Pour-Over": "https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=300&fit=crop",
|
| 91 |
}
|
| 92 |
|
| 93 |
-
DEFAULT_IMG = "https://images.unsplash.com/photo-
|
| 94 |
|
| 95 |
|
| 96 |
def _get_product_image(title: str) -> str:
|
|
|
|
| 57 |
"Shoes": "https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=400&h=300&fit=crop",
|
| 58 |
"Jacket": "https://images.unsplash.com/photo-1551028719-00167b16eac5?w=400&h=300&fit=crop",
|
| 59 |
"Watch": "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400&h=300&fit=crop",
|
| 60 |
+
"Mat": "https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=400&h=300&fit=crop", # reusing backpack as mat placeholder
|
| 61 |
+
"Tights": "https://images.unsplash.com/photo-1556821840-3a63f95609a7?w=400&h=300&fit=crop", # reusing hoodie as apparel placeholder
|
| 62 |
+
"Pack": "https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=400&h=300&fit=crop",
|
| 63 |
"Headphones": "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400&h=300&fit=crop",
|
| 64 |
"Tracker": "https://images.unsplash.com/photo-1557438159-51eec7a6c9e8?w=400&h=300&fit=crop",
|
| 65 |
"Earbuds": "https://images.unsplash.com/photo-1590658268037-6bf12f032f55?w=400&h=300&fit=crop",
|
|
|
|
| 92 |
"Pour-Over": "https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=400&h=300&fit=crop",
|
| 93 |
}
|
| 94 |
|
| 95 |
+
DEFAULT_IMG = "https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=400&h=300&fit=crop" # use shoes as fallback so it never 404s
|
| 96 |
|
| 97 |
|
| 98 |
def _get_product_image(title: str) -> str:
|