user-agent
commited on
Commit
•
c8369a8
1
Parent(s):
a70ebda
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ ATTRIBUTES_DICT = attributes_data['attribute_mapping']
|
|
44 |
|
45 |
def shot(input, category, level):
|
46 |
output_dict = {}
|
47 |
-
if level
|
48 |
subColour,mainColour,score = get_colour(ast.literal_eval(str(input)),category)
|
49 |
openai_parsed_response = get_openAI_tags(ast.literal_eval(str(input)))
|
50 |
face_embeddings = get_face_embeddings(ast.literal_eval(str(input)))
|
@@ -59,7 +59,7 @@ def shot(input, category, level):
|
|
59 |
output_dict['cropped_images'] = cropped_images
|
60 |
|
61 |
|
62 |
-
if level
|
63 |
common_result = get_predicted_attributes(ast.literal_eval(str(input)),category)
|
64 |
output_dict['attributes'] = common_result
|
65 |
output_dict['subcategory'] = category
|
|
|
44 |
|
45 |
def shot(input, category, level):
|
46 |
output_dict = {}
|
47 |
+
if level == 'variant':
|
48 |
subColour,mainColour,score = get_colour(ast.literal_eval(str(input)),category)
|
49 |
openai_parsed_response = get_openAI_tags(ast.literal_eval(str(input)))
|
50 |
face_embeddings = get_face_embeddings(ast.literal_eval(str(input)))
|
|
|
59 |
output_dict['cropped_images'] = cropped_images
|
60 |
|
61 |
|
62 |
+
if level == 'product':
|
63 |
common_result = get_predicted_attributes(ast.literal_eval(str(input)),category)
|
64 |
output_dict['attributes'] = common_result
|
65 |
output_dict['subcategory'] = category
|