Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,12 +95,13 @@ def page2():
|
|
| 95 |
st.text("Using Scrapfly")
|
| 96 |
brand_summary_html = create_screenshot_from_scrap_fly(brand_link)
|
| 97 |
if brand_summary_html["success"]:
|
| 98 |
-
st.image(brand_summary_html["location"])
|
| 99 |
compressed_image = f"comp_brand_{random.randint(1, 100000000)}.png"
|
| 100 |
comp = check_and_compress_image(brand_summary_html["location"], compressed_image)
|
| 101 |
if comp["success"]:
|
|
|
|
| 102 |
brand_image_embed = embed_base64_for_claude(compressed_image)
|
| 103 |
else:
|
|
|
|
| 104 |
brand_image_embed = embed_base64_for_claude(brand_summary_html["location"])
|
| 105 |
brand_summary_response = create_claude_image_request_for_image_captioning(
|
| 106 |
"Fashion expert of understanding brand details",
|
|
|
|
| 95 |
st.text("Using Scrapfly")
|
| 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 |
+
st.image(compressed_image)
|
| 102 |
brand_image_embed = embed_base64_for_claude(compressed_image)
|
| 103 |
else:
|
| 104 |
+
st.image(brand_summary_html["location"])
|
| 105 |
brand_image_embed = embed_base64_for_claude(brand_summary_html["location"])
|
| 106 |
brand_summary_response = create_claude_image_request_for_image_captioning(
|
| 107 |
"Fashion expert of understanding brand details",
|