Update app.py
Browse files
app.py
CHANGED
|
@@ -193,96 +193,97 @@ def chat_function(message, history):
|
|
| 193 |
|
| 194 |
# Now handle the images based on the detected tags
|
| 195 |
tags_to_images = {
|
| 196 |
-
"lila_61": "/
|
| 197 |
-
"lila_63": "/
|
| 198 |
-
"lila_62": "/
|
| 199 |
-
"lila_64": "/
|
| 200 |
-
"fuxia_70": "/
|
| 201 |
-
"fuxia_71": "/
|
| 202 |
-
"fuxia_72": "/
|
| 203 |
-
"fuxia_73": "/
|
| 204 |
-
"fuxia_74": "/
|
| 205 |
-
"melon_68": "/
|
| 206 |
-
"melon_66": "/
|
| 207 |
-
"melon_67": "/
|
| 208 |
-
"melon_65": "/
|
| 209 |
-
"vino_19": "/
|
| 210 |
-
"vino_20": "/
|
| 211 |
-
"barney_69": "/
|
| 212 |
-
"loro_27": "/
|
| 213 |
-
"lacre_02": "/
|
| 214 |
-
"amarillo_03": "/
|
| 215 |
-
"amarillo_04": "/
|
| 216 |
-
"azulino_11": "/
|
| 217 |
-
"azulino_14": "/
|
| 218 |
-
"azulino_12": "/
|
| 219 |
-
"azulino_13": "/
|
| 220 |
-
"beigs_09": "/
|
| 221 |
-
"beigs_10": "/
|
| 222 |
-
"beigs_07": "/
|
| 223 |
-
"beigs_06": "/
|
| 224 |
-
"beigs_08": "/
|
| 225 |
-
"beigs_05": "/
|
| 226 |
-
"marina_32": "/
|
| 227 |
-
"marina_29": "/
|
| 228 |
-
"marina_28": "/
|
| 229 |
-
"marina_31": "/
|
| 230 |
-
"marina_30": "/
|
| 231 |
-
"rojo_26": "/
|
| 232 |
-
"rojo_23": "/
|
| 233 |
-
"rojo_21": "/
|
| 234 |
-
"rojo_22": "/
|
| 235 |
-
"rojo_25": "/
|
| 236 |
-
"rojo_24": "/
|
| 237 |
-
"celeste_40": "/
|
| 238 |
-
"celeste_38": "/
|
| 239 |
-
"celeste_39": "/
|
| 240 |
-
"celeste_33": "/
|
| 241 |
-
"celeste_35": "/
|
| 242 |
-
"celeste_37": "/
|
| 243 |
-
"celeste_41": "/
|
| 244 |
-
"celeste_42": "/
|
| 245 |
-
"celeste_34": "/
|
| 246 |
-
"celeste_36": "/
|
| 247 |
-
"sirenita_01": "/
|
| 248 |
-
"marino_18": "/
|
| 249 |
-
"marino_17": "/
|
| 250 |
-
"marino_16": "/
|
| 251 |
-
"marino_15": "/
|
| 252 |
-
"rosa_87": "/
|
| 253 |
-
"rosa_86": "/
|
| 254 |
-
"rosa_79": "/
|
| 255 |
-
"rosa_82": "/
|
| 256 |
-
"rosa_83": "/
|
| 257 |
-
"rosa_78": "/
|
| 258 |
-
"rosa_84": "/
|
| 259 |
-
"rosa_85": "/
|
| 260 |
-
"rosa_75": "/
|
| 261 |
-
"rosa_80": "/
|
| 262 |
-
"rosa_81": "/
|
| 263 |
-
"rosa_77": "/
|
| 264 |
-
"rosa_76": "/
|
| 265 |
-
"blanco_55": "/
|
| 266 |
-
"blanco_56": "/
|
| 267 |
-
"blanco_53": "/
|
| 268 |
-
"blanco_52": "/
|
| 269 |
-
"blanco_57": "/
|
| 270 |
-
"blanco_49": "/
|
| 271 |
-
"blanco_51": "/
|
| 272 |
-
"blanco_60": "/
|
| 273 |
-
"blanco_47": "/
|
| 274 |
-
"blanco_44": "/
|
| 275 |
-
"blanco_50": "/
|
| 276 |
-
"blanco_48": "/
|
| 277 |
-
"blanco_59": "/
|
| 278 |
-
"blanco_43": "/
|
| 279 |
-
"blanco_58": "/
|
| 280 |
-
"blanco_46": "/
|
| 281 |
-
"blanco_45": "/
|
| 282 |
-
"blanco_54": "/
|
| 283 |
}
|
| 284 |
|
| 285 |
|
|
|
|
| 286 |
for tag in tags_detected:
|
| 287 |
for key, path in tags_to_images.items():
|
| 288 |
if key in tag and check_image_exists(path):
|
|
|
|
| 193 |
|
| 194 |
# Now handle the images based on the detected tags
|
| 195 |
tags_to_images = {
|
| 196 |
+
"lila_61": "images/lila_61.jpeg",
|
| 197 |
+
"lila_63": "images/lila_63.jpeg",
|
| 198 |
+
"lila_62": "images/lila_62.jpeg",
|
| 199 |
+
"lila_64": "images/lila_64.jpeg",
|
| 200 |
+
"fuxia_70": "images/fuxia_70.jpeg",
|
| 201 |
+
"fuxia_71": "images/fuxia_71.jpeg",
|
| 202 |
+
"fuxia_72": "images/fuxia_72.jpeg",
|
| 203 |
+
"fuxia_73": "images/fuxia_73.jpeg",
|
| 204 |
+
"fuxia_74": "images/fuxia_74.jpeg",
|
| 205 |
+
"melon_68": "images/melon_68.jpeg",
|
| 206 |
+
"melon_66": "images/melon_66.jpeg",
|
| 207 |
+
"melon_67": "images/melon_67.jpeg",
|
| 208 |
+
"melon_65": "images/melon_65.jpeg",
|
| 209 |
+
"vino_19": "images/vino_19.jpeg",
|
| 210 |
+
"vino_20": "images/vino_20.jpeg",
|
| 211 |
+
"barney_69": "images/barney_69.jpeg",
|
| 212 |
+
"loro_27": "images/loro_27.png",
|
| 213 |
+
"lacre_02": "images/lacre_02.jpeg",
|
| 214 |
+
"amarillo_03": "images/amarillo_03.jpeg",
|
| 215 |
+
"amarillo_04": "images/amarillo_04.jpeg",
|
| 216 |
+
"azulino_11": "images/azulino_11.jpeg",
|
| 217 |
+
"azulino_14": "images/azulino_14.jpeg",
|
| 218 |
+
"azulino_12": "images/azulino_12.jpeg",
|
| 219 |
+
"azulino_13": "images/azulino_13.jpeg",
|
| 220 |
+
"beigs_09": "images/beigs_09.jpeg",
|
| 221 |
+
"beigs_10": "images/beigs_10.jpeg",
|
| 222 |
+
"beigs_07": "images/beigs_07.jpeg",
|
| 223 |
+
"beigs_06": "images/beigs_06.jpeg",
|
| 224 |
+
"beigs_08": "images/beigs_08.jpeg",
|
| 225 |
+
"beigs_05": "images/beigs_05.jpeg",
|
| 226 |
+
"marina_32": "images/marina_32.jpeg",
|
| 227 |
+
"marina_29": "images/marina_29.jpeg",
|
| 228 |
+
"marina_28": "images/marina_28.jpeg",
|
| 229 |
+
"marina_31": "images/marina_31.jpeg",
|
| 230 |
+
"marina_30": "images/marina_30.jpeg",
|
| 231 |
+
"rojo_26": "images/rojo_26.jpeg",
|
| 232 |
+
"rojo_23": "images/rojo_23.jpeg",
|
| 233 |
+
"rojo_21": "images/rojo_21.jpeg",
|
| 234 |
+
"rojo_22": "images/rojo_22.jpeg",
|
| 235 |
+
"rojo_25": "images/rojo_25.jpeg",
|
| 236 |
+
"rojo_24": "images/rojo_24.jpeg",
|
| 237 |
+
"celeste_40": "images/celeste_40.jpeg",
|
| 238 |
+
"celeste_38": "images/celeste_38.jpeg",
|
| 239 |
+
"celeste_39": "images/celeste_39.jpeg",
|
| 240 |
+
"celeste_33": "images/celeste_33.jpeg",
|
| 241 |
+
"celeste_35": "images/celeste_35.jpeg",
|
| 242 |
+
"celeste_37": "images/celeste_37.jpeg",
|
| 243 |
+
"celeste_41": "images/celeste_41.jpeg",
|
| 244 |
+
"celeste_42": "images/celeste_42.jpeg",
|
| 245 |
+
"celeste_34": "images/celeste_34.jpeg",
|
| 246 |
+
"celeste_36": "images/celeste_36.jpeg",
|
| 247 |
+
"sirenita_01": "images/sirenita_01.png",
|
| 248 |
+
"marino_18": "images/marino_18.jpeg",
|
| 249 |
+
"marino_17": "images/marino_17.jpeg",
|
| 250 |
+
"marino_16": "images/marino_16.jpeg",
|
| 251 |
+
"marino_15": "images/marino_15.jpeg",
|
| 252 |
+
"rosa_87": "images/rosa_87.jpeg",
|
| 253 |
+
"rosa_86": "images/rosa_86.png",
|
| 254 |
+
"rosa_79": "images/rosa_79.jpeg",
|
| 255 |
+
"rosa_82": "images/rosa_82.png",
|
| 256 |
+
"rosa_83": "images/rosa_83.jpeg",
|
| 257 |
+
"rosa_78": "images/rosa_78.jpeg",
|
| 258 |
+
"rosa_84": "images/rosa_84.jpeg",
|
| 259 |
+
"rosa_85": "images/rosa_85.jpeg",
|
| 260 |
+
"rosa_75": "images/rosa_75.jpeg",
|
| 261 |
+
"rosa_80": "images/rosa_80.png",
|
| 262 |
+
"rosa_81": "images/rosa_81.png",
|
| 263 |
+
"rosa_77": "images/rosa_77.jpeg",
|
| 264 |
+
"rosa_76": "images/rosa_76.png",
|
| 265 |
+
"blanco_55": "images/blanco_55.jpeg",
|
| 266 |
+
"blanco_56": "images/blanco_56.jpeg",
|
| 267 |
+
"blanco_53": "images/blanco_53.jpeg",
|
| 268 |
+
"blanco_52": "images/blanco_52.jpeg",
|
| 269 |
+
"blanco_57": "images/blanco_57.jpeg",
|
| 270 |
+
"blanco_49": "images/blanco_49.jpeg",
|
| 271 |
+
"blanco_51": "images/blanco_51.jpeg",
|
| 272 |
+
"blanco_60": "images/blanco_60.jpeg",
|
| 273 |
+
"blanco_47": "images/blanco_47.jpeg",
|
| 274 |
+
"blanco_44": "images/blanco_44.jpeg",
|
| 275 |
+
"blanco_50": "images/blanco_50.jpeg",
|
| 276 |
+
"blanco_48": "images/blanco_48.jpeg",
|
| 277 |
+
"blanco_59": "images/blanco_59.jpeg",
|
| 278 |
+
"blanco_43": "images/blanco_43.jpeg",
|
| 279 |
+
"blanco_58": "images/blanco_58.png",
|
| 280 |
+
"blanco_46": "images/blanco_46.jpeg",
|
| 281 |
+
"blanco_45": "images/blanco_45.jpeg",
|
| 282 |
+
"blanco_54": "images/blanco_54.jpeg",
|
| 283 |
}
|
| 284 |
|
| 285 |
|
| 286 |
+
|
| 287 |
for tag in tags_detected:
|
| 288 |
for key, path in tags_to_images.items():
|
| 289 |
if key in tag and check_image_exists(path):
|