Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -34,7 +34,7 @@ def process_tags_chat(search_results):
|
|
34 |
for field in LINK_FIELDS
|
35 |
if field in result['metadata']
|
36 |
]
|
37 |
-
|
38 |
full_response = ""
|
39 |
image_url = None
|
40 |
tags_detected = []
|
@@ -56,7 +56,6 @@ def process_tags_chat(search_results):
|
|
56 |
# Manejar las imágenes basadas en los tags detectados
|
57 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
58 |
images_dir = os.path.join(current_dir, "images") # Asegúrate de que la carpeta 'images' exista
|
59 |
-
|
60 |
tags_to_images = {
|
61 |
"rld 0": os.path.join(images_dir, "rld_0.png"),
|
62 |
"rld 1": os.path.join(images_dir, "rld_1.png"),
|
@@ -70,4 +69,5 @@ def process_tags_chat(search_results):
|
|
70 |
if check_image_exists(path):
|
71 |
image_url = path
|
72 |
break # Asumimos solo una imagen relevante
|
|
|
73 |
return full_response, image_url
|
|
|
34 |
for field in LINK_FIELDS
|
35 |
if field in result['metadata']
|
36 |
]
|
37 |
+
|
38 |
full_response = ""
|
39 |
image_url = None
|
40 |
tags_detected = []
|
|
|
56 |
# Manejar las imágenes basadas en los tags detectados
|
57 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
58 |
images_dir = os.path.join(current_dir, "images") # Asegúrate de que la carpeta 'images' exista
|
|
|
59 |
tags_to_images = {
|
60 |
"rld 0": os.path.join(images_dir, "rld_0.png"),
|
61 |
"rld 1": os.path.join(images_dir, "rld_1.png"),
|
|
|
69 |
if check_image_exists(path):
|
70 |
image_url = path
|
71 |
break # Asumimos solo una imagen relevante
|
72 |
+
|
73 |
return full_response, image_url
|