Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,8 +96,11 @@ def page2():
|
|
96 |
brand_summary_html = create_screenshot_from_scrap_fly(brand_link)
|
97 |
if brand_summary_html["success"]:
|
98 |
compressed_image = f"comp_brand_{random.randint(1, 100000000)}.png"
|
99 |
-
check_and_compress_image(brand_summary_html["location"], compressed_image)
|
100 |
-
|
|
|
|
|
|
|
101 |
brand_summary_response = create_claude_image_request_for_image_captioning(
|
102 |
"Fashion expert of understanding brand details",
|
103 |
st.session_state["brand_prompt"], brand_image_embed)
|
|
|
96 |
brand_summary_html = create_screenshot_from_scrap_fly(brand_link)
|
97 |
if brand_summary_html["success"]:
|
98 |
compressed_image = f"comp_brand_{random.randint(1, 100000000)}.png"
|
99 |
+
comp = check_and_compress_image(brand_summary_html["location"], compressed_image)
|
100 |
+
if comp["success"]:
|
101 |
+
brand_image_embed = embed_base64_for_claude(compressed_image)
|
102 |
+
else:
|
103 |
+
brand_image_embed = embed_base64_for_claude(brand_summary_html["location"])
|
104 |
brand_summary_response = create_claude_image_request_for_image_captioning(
|
105 |
"Fashion expert of understanding brand details",
|
106 |
st.session_state["brand_prompt"], brand_image_embed)
|