WIP - UI, Audio, firecrawl, long-form - V0.5
This commit is contained in:
11
alwrity.py
11
alwrity.py
@@ -117,6 +117,7 @@ def sidebar_configuration():
|
||||
st.warning("Please specify the tone of your content.")
|
||||
|
||||
blog_demographic_options = ["Professional", "Gen-Z", "Tech-savvy", "Student", "Digital Marketing", "Customize"]
|
||||
|
||||
blog_demographic = st.selectbox("Target Audience",
|
||||
options=blog_demographic_options,
|
||||
help="Choose the target audience.")
|
||||
@@ -132,9 +133,17 @@ def sidebar_configuration():
|
||||
blog_type = st.selectbox("Content Type",
|
||||
options=["Informational", "Commercial", "Company", "News", "Finance", "Competitor", "Programming", "Scholar"],
|
||||
help="Choose the type of the blog.")
|
||||
|
||||
blog_language = st.selectbox("Content Language",
|
||||
options=["English", "Spanish", "German", "Chinese", "Arabic", "Nepali", "Hindi", "Hindustani"],
|
||||
options=["English", "Spanish", "German", "Chinese", "Arabic", "Nepali", "Hindi", "Hindustani", "Customize"],
|
||||
help="Choose the language of the blog.")
|
||||
if blog_language == "Customize":
|
||||
custom_lang = st.text_input("Enter the language of your choice", help="Specify the content language.")
|
||||
if custom_lang:
|
||||
blog_language = custom_lang
|
||||
else:
|
||||
st.warning("Please specify the language of your content.")
|
||||
|
||||
blog_output_format = st.selectbox("Content Output Format",
|
||||
options=["markdown", "HTML", "plaintext"],
|
||||
help="Choose the output format of the blog.")
|
||||
|
||||
@@ -135,9 +135,9 @@ def blog_from_keyword():
|
||||
type=["txt", "pdf", "docx", "jpg", "jpeg", "png", "mp3", "wav", "mp4", "mkv", "avi"],
|
||||
help='Attach files such as audio, video, images, or documents.')
|
||||
with col3:
|
||||
user_input = record_voice()
|
||||
if user_input:
|
||||
st.info(user_input)
|
||||
audio_input = record_voice()
|
||||
if audio_input:
|
||||
st.info(audio_input)
|
||||
|
||||
temp_file_path = None
|
||||
if uploaded_file is not None:
|
||||
@@ -152,7 +152,7 @@ def blog_from_keyword():
|
||||
st.empty()
|
||||
if user_input == "":
|
||||
user_input = None
|
||||
if uploaded_file is None and user_input is None:
|
||||
if not uploaded_file and not user_input and not audio_input:
|
||||
st.error("🤬🤬 Either Enter/Type/Attach, can't read your mind.(yet..)")
|
||||
st.stop()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ body {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background: #1565C0;
|
||||
padding: 12px 20px;
|
||||
padding: 6px 10px;
|
||||
margin: 5px;
|
||||
border-radius: 8px;
|
||||
border: 2px solid #ddd;
|
||||
@@ -86,24 +86,6 @@ body {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* Input fields styling */
|
||||
input[type="text"], input[type="file"], select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
font-weight: bold;
|
||||
margin: 8px 0;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 4px;
|
||||
background-color: #f0f8ff;
|
||||
font-size: 16px;
|
||||
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
input[type="text"]:focus, input[type="file"]:focus, select:focus {
|
||||
border-color: #1565C0;
|
||||
box-shadow: 0 0 3px rgba(21, 101, 192, 0.5);
|
||||
}
|
||||
|
||||
/* Custom button styling */
|
||||
div.stButton > button:first-child {
|
||||
@@ -199,12 +181,11 @@ audio::-webkit-media-controls-timeline {
|
||||
|
||||
/* Select input styling */
|
||||
.stSelectbox > div[data-baseweb="select"] > div {
|
||||
padding: 6px;
|
||||
margin: 8px 0;
|
||||
border: 2px solid #1565C0;
|
||||
border-radius: 2px;
|
||||
background-color: #f0f8ff;
|
||||
font-size: 18px;
|
||||
padding: -1px;
|
||||
margin: 2px 0;
|
||||
border: 3px solid #1565C0;
|
||||
background-color: #ffc10794;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
||||
appearance: none;
|
||||
|
||||
Reference in New Issue
Block a user