Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,8 @@ image_sources = load_image_sources()
|
|
48 |
|
49 |
def get_image_url(image_type: str):
|
50 |
"""Finds the best match for the given image type using fuzzy matching."""
|
51 |
-
choices = list(image_sources.keys()) # Get all available keys
|
|
|
52 |
best_match, score, *rest = process.extractOne(image_type, choices)
|
53 |
|
54 |
if score > 90: # Set a threshold to ensure a reasonable match
|
|
|
48 |
|
49 |
def get_image_url(image_type: str):
|
50 |
"""Finds the best match for the given image type using fuzzy matching."""
|
51 |
+
#choices = list(image_sources.keys()) # Get all available keys
|
52 |
+
choices = list(expanded.keys()) # Get all available keys
|
53 |
best_match, score, *rest = process.extractOne(image_type, choices)
|
54 |
|
55 |
if score > 90: # Set a threshold to ensure a reasonable match
|