File size: 743 Bytes
4f01e45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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()