diff --git a/alwrity.py b/alwrity.py index 9378e857..36ee2a0a 100644 --- a/alwrity.py +++ b/alwrity.py @@ -102,12 +102,30 @@ def sidebar_configuration(): with st.sidebar.expander("**👷 Content Personalization**"): blog_length = st.text_input("**Content Length**", value="2000", help="Length of blogs Or word count. Note: It won't be exact and depends on GPT providers and Max token count.") - blog_tone = st.selectbox("**Content Tone**", - options=["Casual", "Professional", "How-to", "Beginner", "Research", "Programming", "Social Media"], + + blog_tone_options = ["Casual", "Professional", "How-to", "Beginner", "Research", "Programming", "Social Media", "Others"] + blog_tone = st.selectbox("**Content Tone**", + options=blog_tone_options, help="Choose the tone of the blog.") - blog_demographic = st.selectbox("Target Audience", - options=["Working professional", "Content creators & Digital marketing", "Gen-Z", "Tech-savvy", "Students", "Kids"], - help="Choose the target audience.") + + if blog_tone == "Others": + custom_tone = st.text_input("Enter the tone of your content", help="Specify the tone of your content.") + if custom_tone: + blog_tone = custom_tone + else: + st.warning("Please specify the tone of your content.") + + blog_demographic_options = ["Professional", "Domain Experts", "Gen-Z", "Tech-savvy", "Students", "Digital Marketing", "Others"] + blog_demographic = st.selectbox("Target Audience", + options=blog_demographic_options, + help="Choose the target audience.") + if blog_demographic == "Others": + custom_demographic = st.text_input("Enter your target audience", help="Specify your target audience.") + if custom_demographic: + blog_demographic = custom_demographic + else: + st.warning("Please specify your target audience.") + blog_type = st.selectbox("Content Type", options=["Informational", "Commercial", "Company", "News", "Finance", "Competitor", "Programming", "Scholar"], help="Choose the type of the blog.")