awacke1 commited on
Commit
2960f9a
ยท
verified ยท
1 Parent(s): 6f4a930

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +121 -112
app.py CHANGED
@@ -5,44 +5,47 @@ import random
5
  # Set page configuration
6
  st.set_page_config(page_title="ChatGPT Prompt Generator", page_icon="๐Ÿง ", layout="wide")
7
 
8
- # Custom CSS for ultra-compact layout with wide columns
9
  st.markdown("""
10
  <style>
11
  .main {background-color: #f8f9fa;}
12
  .stButton button {
13
  border-radius: 4px;
14
- padding: 1px 3px;
15
- font-size: 0.7em;
16
- display: inline-flex;
17
- align-items: center;
18
- margin: 1px;
19
  min-height: 0px;
20
- white-space: nowrap;
 
21
  }
22
  .stButton button:hover {background-color: #e9ecef;}
23
  div[data-testid="stVerticalBlock"] {gap: 0.3rem;}
24
  div[data-testid="stHorizontalBlock"] {gap: 0.3rem;}
25
  .stTextArea textarea, .stTextInput input {
26
  padding: 0.2rem;
27
- font-size: 0.7em;
28
  min-height: 0px;
29
  }
30
- div[data-testid="stForm"] {border-width: 0px; padding: 0rem 0rem;}
31
- .row-widget.stRadio > div {flex-direction: row;}
32
- .row-widget.stRadio > div > label {margin: 0px 0.1rem; padding: 0.1rem 0.3rem; font-size: 0.7em;}
33
  h1, h2, h3 {margin-top: 0; margin-bottom: 0.1rem; font-size: 0.9rem;}
34
  p, div {margin-bottom: 0.1rem; font-size: 0.8rem;}
35
- .wide-grid-container {
36
- display: grid;
37
- grid-template-columns: repeat(10, 1fr);
38
- gap: 2px;
 
 
39
  }
40
  .section-header {
41
  font-weight: bold;
42
  font-size: 0.9rem;
43
  margin-bottom: 0.1rem;
44
- margin-top: 0.2rem;
45
  color: #333;
 
 
 
 
 
 
 
46
  }
47
  .prompt-display {
48
  background-color: #ffffff;
@@ -60,6 +63,9 @@ st.markdown("""
60
  margin-bottom: 3px;
61
  }
62
  .emoji {font-size: 0.9em;}
 
 
 
63
  </style>
64
  """, unsafe_allow_html=True)
65
 
@@ -81,9 +87,7 @@ data = {
81
  {"name": "Life Coach", "emoji": "๐Ÿง˜"}, {"name": "Data Analyst", "emoji": "๐Ÿ“ˆ"},
82
  {"name": "Influencer", "emoji": "๐Ÿ“ฑ"}, {"name": "Language Tutor", "emoji": "๐Ÿ—ฃ๏ธ"},
83
  {"name": "Fitness Trainer", "emoji": "๐Ÿ’ช"}, {"name": "Teacher", "emoji": "๐Ÿ‘จโ€๐Ÿซ"},
84
- {"name": "Therapist", "emoji": "๐Ÿง"}, {"name": "Detective", "emoji": "๐Ÿ”"},
85
- {"name": "Journalist", "emoji": "๐Ÿ“ฐ"}, {"name": "Scientist", "emoji": "๐Ÿ”ฌ"},
86
- {"name": "Chef", "emoji": "๐Ÿ‘จโ€๐Ÿณ"}, {"name": "Artist", "emoji": "๐ŸŽจ"}
87
  ],
88
  'tones': [
89
  {"name": "Informative", "emoji": "โ„น๏ธ"}, {"name": "Inspirational", "emoji": "โœจ"},
@@ -91,9 +95,7 @@ data = {
91
  {"name": "Professional", "emoji": "๐Ÿ‘”"}, {"name": "Casual", "emoji": "๐Ÿ‘‹"},
92
  {"name": "Persuasive", "emoji": "๐Ÿค"}, {"name": "Encouraging", "emoji": "๐Ÿ™Œ"},
93
  {"name": "Empathetic", "emoji": "๐Ÿค—"}, {"name": "Serious", "emoji": "๐Ÿ˜"},
94
- {"name": "Enthusiastic", "emoji": "๐Ÿคฉ"}, {"name": "Thoughtful", "emoji": "๐Ÿ’ญ"},
95
- {"name": "Sarcastic", "emoji": "๐Ÿ˜"}, {"name": "Motivated", "emoji": "๐Ÿ’ช"},
96
- {"name": "Critical", "emoji": "๐Ÿง"}, {"name": "Optimistic", "emoji": "๐Ÿ˜ƒ"}
97
  ],
98
  'instructions': [
99
  {"name": "Create", "emoji": "๐Ÿ”จ"}, {"name": "Suggest", "emoji": "๐Ÿ’ก"},
@@ -101,13 +103,10 @@ data = {
101
  {"name": "Analyze", "emoji": "๐Ÿ”"}, {"name": "Explain", "emoji": "๐Ÿ“š"},
102
  {"name": "Describe", "emoji": "๐Ÿ”Ž"}, {"name": "Summarize", "emoji": "๐Ÿ“‹"},
103
  {"name": "Compare", "emoji": "โš–๏ธ"}, {"name": "Outline", "emoji": "๐Ÿ“‹"},
104
- {"name": "Evaluate", "emoji": "โญ"}, {"name": "List", "emoji": "๐Ÿ“‹"},
105
- {"name": "Draft", "emoji": "๐Ÿ“ƒ"}, {"name": "Review", "emoji": "๐Ÿ‘๏ธ"},
106
- {"name": "Generate", "emoji": "โš™๏ธ"}, {"name": "Plan", "emoji": "๐Ÿ—“๏ธ"}
107
  ],
108
  'lengths': [
109
- {"name": "100 Words", "emoji": "๐Ÿ“Ž"}, {"name": "300 Words", "emoji": "๐Ÿ“"},
110
- {"name": "500 Words", "emoji": "๐Ÿ“„"}, {"name": "1000 Words", "emoji": "๐Ÿ“ƒ"},
111
  {"name": "Short", "emoji": "๐Ÿฉณ"}, {"name": "Medium", "emoji": "๐Ÿ“Š"},
112
  {"name": "Long", "emoji": "๐Ÿ“œ"}, {"name": "Brief", "emoji": "๐Ÿ’จ"},
113
  {"name": "Detailed", "emoji": "๐Ÿ”Ž"}, {"name": "Comprehensive", "emoji": "๐Ÿ“š"}
@@ -118,98 +117,103 @@ data = {
118
  {"name": "Summary", "emoji": "๐Ÿ“‹"}, {"name": "Story", "emoji": "๐Ÿ“–"},
119
  {"name": "Essay", "emoji": "๐Ÿ“„"}, {"name": "Review", "emoji": "โญ"},
120
  {"name": "Tutorial", "emoji": "๐Ÿ‘จโ€๐Ÿซ"}, {"name": "Report", "emoji": "๐Ÿ“Š"},
121
- {"name": "Plan", "emoji": "๐Ÿ“†"}, {"name": "Script", "emoji": "๐ŸŽฌ"},
122
- {"name": "Outline", "emoji": "๐Ÿ“‘"}, {"name": "Letter", "emoji": "โœ‰๏ธ"},
123
- {"name": "Presentation", "emoji": "๐ŸŽฏ"}, {"name": "Analysis", "emoji": "๐Ÿ“ˆ"}
124
  ],
125
  'audiences': [
126
  {"name": "Beginners", "emoji": "๐ŸŒฑ"}, {"name": "Experts", "emoji": "๐Ÿง "},
127
  {"name": "Students", "emoji": "๐ŸŽ“"}, {"name": "Professionals", "emoji": "๐Ÿ‘”"},
128
  {"name": "Business Owners", "emoji": "๐Ÿ’ผ"}, {"name": "General Public", "emoji": "๐Ÿ‘ฅ"},
129
- {"name": "Developers", "emoji": "๐Ÿ’ป"}, {"name": "Children", "emoji": "๐Ÿ‘ถ"},
130
- {"name": "Executives", "emoji": "๐Ÿ‘ฉโ€๐Ÿ’ผ"}, {"name": "Seniors", "emoji": "๐Ÿ‘ต"},
131
- {"name": "Teachers", "emoji": "๐Ÿ‘ฉโ€๐Ÿซ"}, {"name": "Parents", "emoji": "๐Ÿ‘ช"}
132
  ],
133
  'formats': [
134
  {"name": "Markdown", "emoji": "๐Ÿ“"}, {"name": "HTML", "emoji": "๐ŸŒ"},
135
  {"name": "Plain Text", "emoji": "๐Ÿ“„"}, {"name": "JSON", "emoji": "๐Ÿ”„"},
136
- {"name": "PDF", "emoji": "๐Ÿ“‘"}, {"name": "Python", "emoji": "๐Ÿ"},
137
- {"name": "JavaScript", "emoji": "๐Ÿ“œ"}, {"name": "SQL", "emoji": "๐Ÿ’พ"},
138
- {"name": "CSV", "emoji": "๐Ÿ“Š"}, {"name": "XML", "emoji": "๐Ÿ““"}
139
  ]
140
  }
141
 
142
- # Function to create buttons for a category in a wide grid
143
- def create_wide_grid_buttons(category_name, items):
144
- st.markdown(f"<div class='section-header'>{category_name}</div>", unsafe_allow_html=True)
145
- st.markdown("<div class='wide-grid-container'>", unsafe_allow_html=True)
 
 
 
146
 
147
  for i, item in enumerate(items):
148
  key = f"{category_name.lower().replace(' ', '_')}_{i}"
149
  is_selected = st.session_state.selections.get(category_name.lower().replace(' ', '_')) == item
150
  button_type = "primary" if is_selected else "secondary"
151
 
152
- if st.button(f"{item['emoji']} {item['name']}", key=key, help=f"Select {item['name']}",
153
- type=button_type, use_container_width=True):
 
 
154
  st.session_state.selections[category_name.lower().replace(' ', '_')] = item
155
  st.experimental_rerun()
156
 
157
- st.markdown("</div>", unsafe_allow_html=True)
158
 
159
  # Minimal header
160
  st.markdown("<h2 style='text-align: center; font-size: 1.2rem;'><span class='emoji'>๐Ÿง </span> ChatGPT Prompt Generator</h2>", unsafe_allow_html=True)
161
 
162
- # Main layout - Two rows with many columns
163
- row1, row2 = st.columns([7, 3])
164
 
165
- with row1:
166
- # First set of categories
167
- col1, col2 = st.columns(2)
168
-
169
- with col1:
170
- create_wide_grid_buttons("Role", data['roles'])
171
- create_wide_grid_buttons("Tone", data['tones'])
172
- create_wide_grid_buttons("Instruction", data['instructions'])
173
 
174
- with col2:
175
- create_wide_grid_buttons("Length", data['lengths'])
176
- create_wide_grid_buttons("Content Type", data['content_types'])
177
- create_wide_grid_buttons("Audience", data['audiences'])
178
 
179
- # Format and text fields in a more compact layout
180
- format_col, inputs_col = st.columns([2, 8])
 
181
 
182
- with format_col:
183
- create_wide_grid_buttons("Format", data['formats'])
 
184
 
185
- with inputs_col:
186
- text_col1, text_col2, text_col3, text_col4 = st.columns(4)
 
 
187
 
188
- with text_col1:
 
 
 
 
 
 
 
 
189
  st.session_state.selections['about'] = st.text_input("๐Ÿ’ฌ Topic",
190
  value=st.session_state.selections['about'],
191
- placeholder="Enter topic",
192
- label_visibility="collapsed")
193
-
194
- with text_col2:
195
- st.session_state.selections['inclusion'] = st.text_input("โœ… Include",
196
- value=st.session_state.selections['inclusion'],
197
- placeholder="What to include",
198
- label_visibility="collapsed")
199
-
200
- with text_col3:
201
- st.session_state.selections['exclusion'] = st.text_input("โŒ Exclude",
202
- value=st.session_state.selections['exclusion'],
203
- placeholder="What to exclude",
204
- label_visibility="collapsed")
205
-
206
- with text_col4:
207
- st.session_state.selections['input_data'] = st.text_input("๐Ÿ“Š Data",
208
  value=st.session_state.selections['input_data'],
209
- placeholder="Input data",
210
- label_visibility="collapsed")
 
 
211
 
212
- with row2:
213
  # Generate prompt based on selections
214
  is_complete = all([
215
  st.session_state.selections['role'], st.session_state.selections['tone'],
@@ -238,17 +242,19 @@ It should be about {sel['about']}."""
238
  else:
239
  prompt = "Select all required components and provide a topic."
240
 
241
- st.markdown("<div class='prompt-display'>", unsafe_allow_html=True)
 
 
242
  st.write(prompt)
243
- st.markdown("</div>", unsafe_allow_html=True)
244
 
245
- # Action buttons in a row
246
- button_col1, button_col2, button_col3 = st.columns(3)
247
- with button_col1:
248
  if st.button("๐Ÿ“‹ Copy", type="primary", use_container_width=True):
249
- st.code(prompt, language="") # This is just to show it was copied
250
 
251
- with button_col2:
252
  if st.button("๐Ÿ”„ Reset", type="secondary", use_container_width=True):
253
  for key in st.session_state.selections:
254
  if key in ['about', 'inclusion', 'exclusion', 'input_data']:
@@ -256,49 +262,52 @@ It should be about {sel['about']}."""
256
  else:
257
  st.session_state.selections[key] = None
258
  st.experimental_rerun()
259
-
260
- with button_col3:
261
  if st.button("๐ŸŽฒ Random", type="secondary", use_container_width=True):
262
  for category in ['role', 'tone', 'instruction', 'length', 'content_type', 'audience', 'format']:
263
  st.session_state.selections[category] = random.choice(data[category+'s'])
264
  st.experimental_rerun()
265
 
266
- # Sample prompts in 2 columns
267
- st.markdown("<div class='section-header' style='font-size: 0.8rem;'>๐Ÿ“š Examples</div>", unsafe_allow_html=True)
268
- sample_col1, sample_col2 = st.columns(2)
 
 
269
 
270
- with sample_col1:
271
- st.markdown("""
272
- <div style="background-color: #e6f3ff; border: 1px solid #b8daff; border-radius: 4px; padding: 4px; margin-bottom: 4px; font-size: 0.7em;">
273
- <b>๐Ÿ‘จโ€๐Ÿซ Teaching</b><pre style="white-space: pre-wrap; font-size: 0.75em; margin: 2px 0px;">Act as a ๐Ÿ‘จโ€๐Ÿซ Teacher, use ๐Ÿ“š Informative tone, Create a ๐Ÿ“‹ Guide for ๐ŸŒฑ Beginners.
274
 
275
- It should be about Git version control.
276
  Include practical examples.
277
  Exclude advanced techniques.
278
 
279
  Return as ๐Ÿ“ Markdown.</pre>
280
- </div>
281
- """, unsafe_allow_html=True)
282
 
283
- with sample_col2:
284
- st.markdown("""
285
- <div style="background-color: #e6ffed; border: 1px solid #b8e6cc; border-radius: 4px; padding: 4px; margin-bottom: 4px; font-size: 0.7em;">
286
- <b>๐Ÿ’ผ Business</b><pre style="white-space: pre-wrap; font-size: 0.75em; margin: 2px 0px;">Act as a ๐Ÿ‘” Professional, use ๐Ÿค Persuasive tone, Write a ๐Ÿ“ง Email for ๐Ÿ‘ฉโ€๐Ÿ’ผ Executives.
287
 
288
  It should be about a product launch.
289
  Include ROI metrics.
290
  Exclude technical details.
291
 
292
  Return as ๐Ÿ“„ Plain Text.</pre>
293
- </div>
294
- """, unsafe_allow_html=True)
295
 
296
- # Quick guide
297
  st.markdown("""
298
  <div style="font-size: 0.7em; background-color: #f1f8ff; border-radius: 4px; padding: 4px; margin-top: 4px;">
299
- <b>Structure:</b> Act as [<span style="color:blue">ROLE</span>], use [<span style="color:green">TONE</span>] tone, [<span style="color:red">INSTRUCTION</span>] a [<span style="color:purple">LENGTH</span>] [<span style="color:orange">CONTENT TYPE</span>] for [<span style="color:pink">AUDIENCE</span>].<br>
 
300
  It should be about [TOPIC].<br>
301
  Include [INCLUSION]. Exclude [EXCLUSION].<br>
302
  Return as [FORMAT].
303
  </div>
304
- """, unsafe_allow_html=True)
 
 
 
5
  # Set page configuration
6
  st.set_page_config(page_title="ChatGPT Prompt Generator", page_icon="๐Ÿง ", layout="wide")
7
 
8
+ # Custom CSS for compact buttons in grouped containers
9
  st.markdown("""
10
  <style>
11
  .main {background-color: #f8f9fa;}
12
  .stButton button {
13
  border-radius: 4px;
14
+ padding: 2px 4px;
15
+ font-size: 0.75em;
 
 
 
16
  min-height: 0px;
17
+ margin: 1px;
18
+ display: inline-block;
19
  }
20
  .stButton button:hover {background-color: #e9ecef;}
21
  div[data-testid="stVerticalBlock"] {gap: 0.3rem;}
22
  div[data-testid="stHorizontalBlock"] {gap: 0.3rem;}
23
  .stTextArea textarea, .stTextInput input {
24
  padding: 0.2rem;
25
+ font-size: 0.8em;
26
  min-height: 0px;
27
  }
 
 
 
28
  h1, h2, h3 {margin-top: 0; margin-bottom: 0.1rem; font-size: 0.9rem;}
29
  p, div {margin-bottom: 0.1rem; font-size: 0.8rem;}
30
+ .category-container {
31
+ background-color: white;
32
+ border: 1px solid #e6e6e6;
33
+ border-radius: 4px;
34
+ padding: 5px;
35
+ margin-bottom: 5px;
36
  }
37
  .section-header {
38
  font-weight: bold;
39
  font-size: 0.9rem;
40
  margin-bottom: 0.1rem;
 
41
  color: #333;
42
+ border-bottom: 1px solid #eee;
43
+ padding-bottom: 3px;
44
+ }
45
+ .button-flex-container {
46
+ display: flex;
47
+ flex-wrap: wrap;
48
+ gap: 2px;
49
  }
50
  .prompt-display {
51
  background-color: #ffffff;
 
63
  margin-bottom: 3px;
64
  }
65
  .emoji {font-size: 0.9em;}
66
+ .btn-group {
67
+ margin-bottom: 0px;
68
+ }
69
  </style>
70
  """, unsafe_allow_html=True)
71
 
 
87
  {"name": "Life Coach", "emoji": "๐Ÿง˜"}, {"name": "Data Analyst", "emoji": "๐Ÿ“ˆ"},
88
  {"name": "Influencer", "emoji": "๐Ÿ“ฑ"}, {"name": "Language Tutor", "emoji": "๐Ÿ—ฃ๏ธ"},
89
  {"name": "Fitness Trainer", "emoji": "๐Ÿ’ช"}, {"name": "Teacher", "emoji": "๐Ÿ‘จโ€๐Ÿซ"},
90
+ {"name": "Therapist", "emoji": "๐Ÿง"}, {"name": "Detective", "emoji": "๐Ÿ”"}
 
 
91
  ],
92
  'tones': [
93
  {"name": "Informative", "emoji": "โ„น๏ธ"}, {"name": "Inspirational", "emoji": "โœจ"},
 
95
  {"name": "Professional", "emoji": "๐Ÿ‘”"}, {"name": "Casual", "emoji": "๐Ÿ‘‹"},
96
  {"name": "Persuasive", "emoji": "๐Ÿค"}, {"name": "Encouraging", "emoji": "๐Ÿ™Œ"},
97
  {"name": "Empathetic", "emoji": "๐Ÿค—"}, {"name": "Serious", "emoji": "๐Ÿ˜"},
98
+ {"name": "Enthusiastic", "emoji": "๐Ÿคฉ"}, {"name": "Thoughtful", "emoji": "๐Ÿ’ญ"}
 
 
99
  ],
100
  'instructions': [
101
  {"name": "Create", "emoji": "๐Ÿ”จ"}, {"name": "Suggest", "emoji": "๐Ÿ’ก"},
 
103
  {"name": "Analyze", "emoji": "๐Ÿ”"}, {"name": "Explain", "emoji": "๐Ÿ“š"},
104
  {"name": "Describe", "emoji": "๐Ÿ”Ž"}, {"name": "Summarize", "emoji": "๐Ÿ“‹"},
105
  {"name": "Compare", "emoji": "โš–๏ธ"}, {"name": "Outline", "emoji": "๐Ÿ“‹"},
106
+ {"name": "Evaluate", "emoji": "โญ"}, {"name": "List", "emoji": "๐Ÿ“‹"}
 
 
107
  ],
108
  'lengths': [
109
+ {"name": "300 Words", "emoji": "๐Ÿ“"}, {"name": "500 Words", "emoji": "๐Ÿ“„"},
 
110
  {"name": "Short", "emoji": "๐Ÿฉณ"}, {"name": "Medium", "emoji": "๐Ÿ“Š"},
111
  {"name": "Long", "emoji": "๐Ÿ“œ"}, {"name": "Brief", "emoji": "๐Ÿ’จ"},
112
  {"name": "Detailed", "emoji": "๐Ÿ”Ž"}, {"name": "Comprehensive", "emoji": "๐Ÿ“š"}
 
117
  {"name": "Summary", "emoji": "๐Ÿ“‹"}, {"name": "Story", "emoji": "๐Ÿ“–"},
118
  {"name": "Essay", "emoji": "๐Ÿ“„"}, {"name": "Review", "emoji": "โญ"},
119
  {"name": "Tutorial", "emoji": "๐Ÿ‘จโ€๐Ÿซ"}, {"name": "Report", "emoji": "๐Ÿ“Š"},
120
+ {"name": "Plan", "emoji": "๐Ÿ“†"}, {"name": "Script", "emoji": "๐ŸŽฌ"}
 
 
121
  ],
122
  'audiences': [
123
  {"name": "Beginners", "emoji": "๐ŸŒฑ"}, {"name": "Experts", "emoji": "๐Ÿง "},
124
  {"name": "Students", "emoji": "๐ŸŽ“"}, {"name": "Professionals", "emoji": "๐Ÿ‘”"},
125
  {"name": "Business Owners", "emoji": "๐Ÿ’ผ"}, {"name": "General Public", "emoji": "๐Ÿ‘ฅ"},
126
+ {"name": "Developers", "emoji": "๐Ÿ’ป"}, {"name": "Children", "emoji": "๐Ÿ‘ถ"}
 
 
127
  ],
128
  'formats': [
129
  {"name": "Markdown", "emoji": "๐Ÿ“"}, {"name": "HTML", "emoji": "๐ŸŒ"},
130
  {"name": "Plain Text", "emoji": "๐Ÿ“„"}, {"name": "JSON", "emoji": "๐Ÿ”„"},
131
+ {"name": "PDF", "emoji": "๐Ÿ“‘"}, {"name": "Python Code", "emoji": "๐Ÿ"},
132
+ {"name": "JavaScript", "emoji": "๐Ÿ“œ"}, {"name": "SQL Query", "emoji": "๐Ÿ’พ"}
 
133
  ]
134
  }
135
 
136
+ # Function to create buttons for a category using HTML/CSS flexbox
137
+ def create_category_container(category_name, items, emoji_prefix=""):
138
+ st.markdown(f"""
139
+ <div class="category-container">
140
+ <div class="section-header">{emoji_prefix} {category_name}</div>
141
+ <div class="button-flex-container">
142
+ """, unsafe_allow_html=True)
143
 
144
  for i, item in enumerate(items):
145
  key = f"{category_name.lower().replace(' ', '_')}_{i}"
146
  is_selected = st.session_state.selections.get(category_name.lower().replace(' ', '_')) == item
147
  button_type = "primary" if is_selected else "secondary"
148
 
149
+ if st.button(f"{item['emoji']} {item['name']}", key=key,
150
+ help=f"Select {item['name']}",
151
+ type=button_type,
152
+ use_container_width=False):
153
  st.session_state.selections[category_name.lower().replace(' ', '_')] = item
154
  st.experimental_rerun()
155
 
156
+ st.markdown("</div></div>", unsafe_allow_html=True)
157
 
158
  # Minimal header
159
  st.markdown("<h2 style='text-align: center; font-size: 1.2rem;'><span class='emoji'>๐Ÿง </span> ChatGPT Prompt Generator</h2>", unsafe_allow_html=True)
160
 
161
+ # Main layout with two columns
162
+ left_col, right_col = st.columns([3, 1])
163
 
164
+ with left_col:
165
+ # First row of categories in 3 columns
166
+ row1_col1, row1_col2, row1_col3 = st.columns(3)
 
 
 
 
 
167
 
168
+ with row1_col1:
169
+ create_category_container("Role", data['roles'], "๐Ÿ‘ค")
170
+ create_category_container("Instruction", data['instructions'], "๐Ÿ“")
 
171
 
172
+ with row1_col2:
173
+ create_category_container("Tone", data['tones'], "๐ŸŽญ")
174
+ create_category_container("Length", data['lengths'], "๐Ÿ“")
175
 
176
+ with row1_col3:
177
+ create_category_container("Content Type", data['content_types'], "๐Ÿ“„")
178
+ create_category_container("Audience", data['audiences'], "๐Ÿ‘ฅ")
179
 
180
+ # Second row for Format and Text inputs
181
+ row2 = st.container()
182
+ with row2:
183
+ row2_col1, row2_col2 = st.columns([1, 3])
184
 
185
+ with row2_col1:
186
+ create_category_container("Format", data['formats'], "๐Ÿ“‹")
187
+
188
+ with row2_col2:
189
+ # Use a container for text inputs
190
+ st.markdown('<div class="category-container">', unsafe_allow_html=True)
191
+ st.markdown('<div class="section-header">๐Ÿ“Œ Details</div>', unsafe_allow_html=True)
192
+
193
+ # Create text inputs
194
  st.session_state.selections['about'] = st.text_input("๐Ÿ’ฌ Topic",
195
  value=st.session_state.selections['about'],
196
+ placeholder="Enter what the content should be about")
197
+
198
+ col1, col2 = st.columns(2)
199
+ with col1:
200
+ st.session_state.selections['inclusion'] = st.text_input("โœ… Include",
201
+ value=st.session_state.selections['inclusion'],
202
+ placeholder="What to include in the content")
203
+
204
+ with col2:
205
+ st.session_state.selections['exclusion'] = st.text_input("โŒ Exclude",
206
+ value=st.session_state.selections['exclusion'],
207
+ placeholder="What to exclude from the content")
208
+
209
+ st.session_state.selections['input_data'] = st.text_area("๐Ÿ“Š Input Data",
 
 
 
210
  value=st.session_state.selections['input_data'],
211
+ placeholder="Enter any specific information to use",
212
+ height=60)
213
+
214
+ st.markdown('</div>', unsafe_allow_html=True)
215
 
216
+ with right_col:
217
  # Generate prompt based on selections
218
  is_complete = all([
219
  st.session_state.selections['role'], st.session_state.selections['tone'],
 
242
  else:
243
  prompt = "Select all required components and provide a topic."
244
 
245
+ st.markdown('<div class="category-container">', unsafe_allow_html=True)
246
+ st.markdown('<div class="section-header">๐Ÿ”ฎ Generated Prompt</div>', unsafe_allow_html=True)
247
+ st.markdown('<div class="prompt-display">', unsafe_allow_html=True)
248
  st.write(prompt)
249
+ st.markdown('</div>', unsafe_allow_html=True)
250
 
251
+ # Action buttons
252
+ btn1, btn2, btn3 = st.columns(3)
253
+ with btn1:
254
  if st.button("๐Ÿ“‹ Copy", type="primary", use_container_width=True):
255
+ st.code(prompt, language="")
256
 
257
+ with btn2:
258
  if st.button("๐Ÿ”„ Reset", type="secondary", use_container_width=True):
259
  for key in st.session_state.selections:
260
  if key in ['about', 'inclusion', 'exclusion', 'input_data']:
 
262
  else:
263
  st.session_state.selections[key] = None
264
  st.experimental_rerun()
265
+
266
+ with btn3:
267
  if st.button("๐ŸŽฒ Random", type="secondary", use_container_width=True):
268
  for category in ['role', 'tone', 'instruction', 'length', 'content_type', 'audience', 'format']:
269
  st.session_state.selections[category] = random.choice(data[category+'s'])
270
  st.experimental_rerun()
271
 
272
+ st.markdown('</div>', unsafe_allow_html=True)
273
+
274
+ # Sample prompts
275
+ st.markdown('<div class="category-container">', unsafe_allow_html=True)
276
+ st.markdown('<div class="section-header">๐Ÿ“š Examples</div>', unsafe_allow_html=True)
277
 
278
+ st.markdown("""
279
+ <div style="background-color: #e6f3ff; border: 1px solid #b8daff; border-radius: 4px; padding: 4px; margin-bottom: 4px; font-size: 0.7em;">
280
+ <b>๐Ÿ‘จโ€๐Ÿซ Teaching</b><pre style="white-space: pre-wrap; font-size: 0.75em; margin: 2px 0px;">Act as a ๐Ÿ‘จโ€๐Ÿซ Teacher, use ๐Ÿ“š Informative tone, Create a ๐Ÿ“‹ Guide for ๐ŸŒฑ Beginners.
 
281
 
282
+ It should be about Git.
283
  Include practical examples.
284
  Exclude advanced techniques.
285
 
286
  Return as ๐Ÿ“ Markdown.</pre>
287
+ </div>
288
+ """, unsafe_allow_html=True)
289
 
290
+ st.markdown("""
291
+ <div style="background-color: #e6ffed; border: 1px solid #b8e6cc; border-radius: 4px; padding: 4px; margin-bottom: 4px; font-size: 0.7em;">
292
+ <b>๐Ÿ’ผ Business</b><pre style="white-space: pre-wrap; font-size: 0.75em; margin: 2px 0px;">Act as a ๐Ÿ‘” Professional, use ๐Ÿค Persuasive tone, Write a ๐Ÿ“ง Email for ๐Ÿ‘ฉโ€๐Ÿ’ผ Executives.
 
293
 
294
  It should be about a product launch.
295
  Include ROI metrics.
296
  Exclude technical details.
297
 
298
  Return as ๐Ÿ“„ Plain Text.</pre>
299
+ </div>
300
+ """, unsafe_allow_html=True)
301
 
302
+ # Structure guide
303
  st.markdown("""
304
  <div style="font-size: 0.7em; background-color: #f1f8ff; border-radius: 4px; padding: 4px; margin-top: 4px;">
305
+ <b>Structure:</b><br>
306
+ Act as [<span style="color:blue">ROLE</span>], use [<span style="color:green">TONE</span>] tone, [<span style="color:red">INSTRUCTION</span>] a [<span style="color:purple">LENGTH</span>] [<span style="color:orange">CONTENT TYPE</span>] for [<span style="color:pink">AUDIENCE</span>].<br>
307
  It should be about [TOPIC].<br>
308
  Include [INCLUSION]. Exclude [EXCLUSION].<br>
309
  Return as [FORMAT].
310
  </div>
311
+ """, unsafe_allow_html=True)
312
+
313
+ st.markdown('</div>', unsafe_allow_html=True)