Blog_Generator / app.py
AjithBharadwaj's picture
Create app.py
7643cf4 verified
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()