Skip to content

Commit

Permalink
WIP - UI, Audio, firecrawl, long-form - V0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
AJaySi committed Jun 21, 2024
1 parent 074ddf6 commit 89b2e47
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 30 deletions.
11 changes: 10 additions & 1 deletion alwrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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.")
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/alwrity_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()

Expand Down
31 changes: 6 additions & 25 deletions lib/workspace/alwrity_ui_styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 89b2e47

Please sign in to comment.