Alpha108 commited on
Commit
5fefff9
·
verified ·
1 Parent(s): cf081f2

Update ui_components.py

Browse files
Files changed (1) hide show
  1. ui_components.py +14 -14
ui_components.py CHANGED
@@ -1,24 +1,24 @@
1
  import streamlit as st
2
 
3
  def quick_controls():
4
- idea = st.text_area("Your idea", placeholder="Describe the idea for your LinkedIn post…")
5
- tone = st.selectbox("Tone", ["Professional","Friendly","Contrarian","Technical","Inspirational"], index=0)
6
- words = st.slider("Words", 80, 300, 160, 10)
7
- variations = st.radio("Variations", [1,2,3], index=0, horizontal=True)
8
  col1, col2 = st.columns(2)
9
  with col1:
10
- include_emoji = st.toggle("Include emojis", value=True)
11
  with col2:
12
- add_hashtags = st.toggle("Add hashtags", value=False)
13
- language = st.selectbox("Language", ["English","Urdu","Arabic","French","Spanish"], index=0)
14
  return idea, tone, words, variations, include_emoji, add_hashtags, language
15
 
16
  def pro_controls(defaults):
17
- topic = st.text_input("Topic", value=defaults.get("topic",""))
18
- purpose = st.selectbox("Purpose", ["awareness","lead-gen","hiring","product launch","opinion","lesson learned"], index=0)
19
- audience = st.text_input("Audience", value=defaults.get("audience",""))
20
- tone = st.selectbox("Tone", ["Professional","Friendly","Contrarian","Technical","Inspirational"], index=0)
21
- language = st.selectbox("Language", ["English","Urdu","Arabic","French","Spanish"], index=0)
22
- evidence = st.text_area("Evidence (metric/anecdote/quote)", value="")
23
- style_text = st.text_area("Style cues (max 4, one per line)", value="Short punchy hooks\nActionable bullets\nOne metric per paragraph\nQuestion-led CTA")
24
  return topic, purpose, audience, tone, language, evidence, style_text
 
1
  import streamlit as st
2
 
3
  def quick_controls():
4
+ idea = st.text_area("Your idea", key="qd_idea", placeholder="Describe the idea for your LinkedIn post…")
5
+ tone = st.selectbox("Tone", ["Professional","Friendly","Contrarian","Technical","Inspirational"], index=0, key="qd_tone")
6
+ words = st.slider("Words", 80, 300, 160, 10, key="qd_words")
7
+ variations = st.radio("Variations", [1,2,3], index=0, horizontal=True, key="qd_vars")
8
  col1, col2 = st.columns(2)
9
  with col1:
10
+ include_emoji = st.toggle("Include emojis", value=True, key="qd_emoji")
11
  with col2:
12
+ add_hashtags = st.toggle("Add hashtags", value=False, key="qd_tags")
13
+ language = st.selectbox("Language", ["English","Urdu","Arabic","French","Spanish"], index=0, key="qd_lang")
14
  return idea, tone, words, variations, include_emoji, add_hashtags, language
15
 
16
  def pro_controls(defaults):
17
+ topic = st.text_input("Topic", value=defaults.get("topic",""), key="pro_topic")
18
+ purpose = st.selectbox("Purpose", ["awareness","lead-gen","hiring","product launch","opinion","lesson learned"], index=0, key="pro_purpose")
19
+ audience = st.text_input("Audience", value=defaults.get("audience",""), key="pro_audience")
20
+ tone = st.selectbox("Tone", ["Professional","Friendly","Contrarian","Technical","Inspirational"], index=0, key="pro_tone")
21
+ language = st.selectbox("Language", ["English","Urdu","Arabic","French","Spanish"], index=0, key="pro_lang")
22
+ evidence = st.text_area("Evidence (metric/anecdote/quote)", value="", key="pro_evidence")
23
+ style_text = st.text_area("Style cues (max 4, one per line)", value="Short punchy hooks\nActionable bullets\nOne metric per paragraph\nQuestion-led CTA", key="pro_style")
24
  return topic, purpose, audience, tone, language, evidence, style_text