import streamlit as st from crew import run_task from dotenv import load_dotenv import os load_dotenv() def main(): st.set_page_config(page_title="AI Blog Generator", page_icon="📝") st.title("AI Blog Generator") st.write("Enter a topic to generate a blog post based on YouTube videos.") topic = st.text_input("Topic", "") if st.button("Generate Blog Post"): if topic: with st.spinner("Generating blog post..."): result = run_task(topic) st.success("Blog post generated!") st.markdown(result) else: st.error("Please enter a topic to continue.") if __name__ == "__main__": main()