File size: 870 Bytes
345cd4f
33b20f7
 
345cd4f
 
 
33b20f7
4dafe55
 
 
 
33b20f7
4dafe55
 
 
 
 
 
345cd4f
 
ae08c02
 
4dafe55
345cd4f
4dafe55
33b20f7
4dafe55
345cd4f
 
 
4dafe55
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
27
28
29
30
31
32
import streamlit as st
from main import generate_blog



def main():
    st.title("	:fire: Professional Blog Generator 	:fire:")
    st.markdown(
        """
        <style>
        body {
            background-color: #000000;;
            color: white;
        }
        </style>
        """,
        unsafe_allow_html=True
    )

    st.sidebar.header("Input Parameters")
    role = st.sidebar.text_input("Who is this intednded for ?", "Ex - Data Scientist")
    topic = st.sidebar.text_input("On what Topic should the blog be on ?", "Ex - Machine Learning")
    word_count = st.sidebar.slider("Number of Words", min_value=50, max_value=1000, value=200, step=50)

    if st.sidebar.button("Generate Blog"):
        blog_content = generate_blog(role, word_count ,topic)
        st.markdown(blog_content, unsafe_allow_html=True)

if __name__ == "__main__":
    main()