WIP - UI, firecrawl, long-form - V0.5

This commit is contained in:
ajaysi
2024-06-18 09:22:36 +05:30
parent 3563ac29cb
commit 899abad1ba
2 changed files with 27 additions and 17 deletions

View File

@@ -84,8 +84,13 @@ def write_blog_from_keywords(search_keywords, url=None):
except Exception as err:
st.error(f"Failed to get blog metadata: {err}")
generated_image_filepath = None
try:
generated_image_filepath = generate_image(f"{blog_title} + ' ' + {blog_meta_desc}")
# FIXME: Temporary fix.
text_to_image = f"{blog_title} + ' ' + {blog_meta_desc}"
if not text_to_image:
text_to_image = blog_markdown_str
generated_image_filepath = generate_image(text_to_image)
except Exception as err:
st.warning(f"Failed in Image generation: {err}")