Spaces:
Runtime error
Runtime error
user-agent
commited on
Commit
•
fe481f7
1
Parent(s):
51b66fb
Update app.py
Browse files
app.py
CHANGED
@@ -53,19 +53,23 @@ def shot(input, category, level):
|
|
53 |
openai_parsed_response = get_openAI_tags(ast.literal_eval(str(input)))
|
54 |
face_embeddings = get_face_embeddings(ast.literal_eval(str(input)))
|
55 |
cropped_images, product_crops = get_cropped_images(ast.literal_eval(str(input)), category)
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
#
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
output_dict['image_mapping'] = openai_parsed_response
|
70 |
output_dict['face_embeddings'] = face_embeddings
|
71 |
output_dict['cropped_images'] = cropped_images
|
|
|
53 |
openai_parsed_response = get_openAI_tags(ast.literal_eval(str(input)))
|
54 |
face_embeddings = get_face_embeddings(ast.literal_eval(str(input)))
|
55 |
cropped_images, product_crops = get_cropped_images(ast.literal_eval(str(input)), category)
|
56 |
+
|
57 |
+
# Commenting out the color
|
58 |
+
# -------------------------
|
59 |
+
# if len(product_crops) == 0:
|
60 |
+
# print("No product crops found. Using image urls instead.")
|
61 |
+
# subColour, mainColour, score = get_colour(ast.literal_eval(str(input)), category)
|
62 |
+
# else:
|
63 |
+
# subColour, mainColour, score = get_colour(product_crops, category)
|
64 |
+
|
65 |
+
# # Ensure all outputs are JSON serializable
|
66 |
+
# output_dict['colors'] = {
|
67 |
+
# "main": mainColour,
|
68 |
+
# "sub": subColour,
|
69 |
+
# "score": score
|
70 |
+
# }
|
71 |
+
# -------------------------
|
72 |
+
|
73 |
output_dict['image_mapping'] = openai_parsed_response
|
74 |
output_dict['face_embeddings'] = face_embeddings
|
75 |
output_dict['cropped_images'] = cropped_images
|