JeCabrera commited on
Commit
6e83299
·
verified ·
1 Parent(s): 4d0ba24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py CHANGED
@@ -10,6 +10,11 @@ import docx
10
  from PIL import Image
11
  import io
12
 
 
 
 
 
 
13
  # Set page to wide mode to use full width
14
  st.set_page_config(layout="wide")
15
 
@@ -214,6 +219,24 @@ with col2:
214
  """
215
  instruction += creative_hook_instruction
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  # Add additional context based on input type
218
  if st.session_state.input_type == "manual":
219
  additional_context = f"""
 
10
  from PIL import Image
11
  import io
12
 
13
+ # Import the bullet generator
14
+ from bullets.generator import create_bullet_instruction
15
+ # Import the bonus generator
16
+ from bonuses.generator import create_bonus_instruction
17
+
18
  # Set page to wide mode to use full width
19
  st.set_page_config(layout="wide")
20
 
 
219
  """
220
  instruction += creative_hook_instruction
221
 
222
+ # Add instruction for generating benefit bullets based on the promise
223
+ bullet_content = None
224
+ if hasattr(st.session_state, 'file_content') and st.session_state.input_type in ["file", "both"]:
225
+ bullet_content = st.session_state.file_content
226
+
227
+ instruction += create_bullet_instruction(
228
+ avatar_description=avatar_description,
229
+ product_name=product_name,
230
+ uploaded_content=bullet_content
231
+ )
232
+
233
+ # Add instruction for generating bonuses that complement the offer
234
+ instruction += create_bonus_instruction(
235
+ avatar_description=avatar_description,
236
+ product_name=product_name,
237
+ selected_formula_name=st.session_state.formula_type
238
+ )
239
+
240
  # Add additional context based on input type
241
  if st.session_state.input_type == "manual":
242
  additional_context = f"""