Try Essay, story, Audio to Blog
This commit is contained in:
@@ -30,9 +30,6 @@ def write_blog_from_keywords(search_keywords, url=None):
|
||||
This function will take a blog Topic to first generate sections for it
|
||||
and then generate content for each section.
|
||||
"""
|
||||
# TBD: Keeping the results directory as fixed, for now.
|
||||
os.environ["SEARCH_SAVE_FILE"] = os.path.join(os.getcwd(), "workspace", "web_research_reports",
|
||||
search_keywords.replace(" ", "_") + "_" + datetime.now().strftime("%Y-%m-%d_%H-%M-%S"))
|
||||
# Use to store the blog in a string, to save in a *.md file.
|
||||
blog_markdown_str = ""
|
||||
example_blog_titles = []
|
||||
@@ -48,7 +45,6 @@ def write_blog_from_keywords(search_keywords, url=None):
|
||||
# logger.info/check the final blog content.
|
||||
logger.info("\n######### Draft1: Finished Blog from Google web search: ###########\n\n")
|
||||
|
||||
|
||||
# Do Tavily AI research to augument the above blog.
|
||||
try:
|
||||
tavily_search_result, t_titles = do_tavily_ai_search(search_keywords)
|
||||
|
||||
@@ -36,7 +36,7 @@ def youtube_to_blog(video_url):
|
||||
|
||||
try:
|
||||
# Summarizing the content of the YouTube video
|
||||
audio_blog_content = summarize_youtube_video(audio_text, "gemini")
|
||||
audio_blog_content = summarize_youtube_video(audio_text)
|
||||
logger.info("Successfully converted given URL to blog article.")
|
||||
return audio_blog_content, audio_title
|
||||
except Exception as e:
|
||||
@@ -44,7 +44,7 @@ def youtube_to_blog(video_url):
|
||||
sys.exit(1) # Exit the program due to error in summarize_youtube_video
|
||||
|
||||
|
||||
def summarize_youtube_video(user_content, gpt_providers):
|
||||
def summarize_youtube_video(user_content):
|
||||
"""Generates a summary of a YouTube video using OpenAI GPT-3 and displays a progress bar.
|
||||
Args:
|
||||
video_link: The URL of the YouTube video to summarize.
|
||||
|
||||
Reference in New Issue
Block a user