JeCabrera commited on
Commit
12578b6
·
verified ·
1 Parent(s): f25480d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -193,7 +193,7 @@ with col2:
193
  if st.session_state.submitted and not st.session_state.generated:
194
  with st.spinner('Creando tu oferta perfecta...'):
195
  # Use the create_offer_instruction function to generate the prompt
196
- target_audience = st.session_state.target_audience if hasattr(st.session_state, 'target_audience') and st.session_state.target_audience else 'General audience'
197
 
198
  # Get product_service from session state or use the current value
199
  product_service_value = st.session_state.product_service if hasattr(st.session_state, 'product_service') and st.session_state.product_service else product_service
@@ -208,8 +208,8 @@ with col2:
208
 
209
  # Get the instruction using the formula
210
  instruction = create_offer_instruction(
211
- target_audience=target_audience,
212
- product_service=product_service_value, # Changed from product_name to product_service
213
  selected_formula_name=st.session_state.formula_type,
214
  file_content=file_content,
215
  skills=skills_value
@@ -221,7 +221,7 @@ with col2:
221
  bullet_content = st.session_state.file_content
222
 
223
  instruction += create_bullet_instruction(
224
- target_audience=target_audience,
225
  product_service=product_service_value,
226
  uploaded_content=bullet_content,
227
  skills=skills_value
@@ -229,8 +229,8 @@ with col2:
229
 
230
  # Add instruction for generating bonuses that complement the offer
231
  instruction += create_bonus_instruction(
232
- target_audience=target_audience,
233
- product_service=product_service_value, # Changed from product_name to product_service
234
  selected_formula_name=st.session_state.formula_type,
235
  uploaded_content=bullet_content,
236
  skills=skills_value
 
193
  if st.session_state.submitted and not st.session_state.generated:
194
  with st.spinner('Creando tu oferta perfecta...'):
195
  # Use the create_offer_instruction function to generate the prompt
196
+ target_audience_value = st.session_state.target_audience if hasattr(st.session_state, 'target_audience') and st.session_state.target_audience else 'General audience'
197
 
198
  # Get product_service from session state or use the current value
199
  product_service_value = st.session_state.product_service if hasattr(st.session_state, 'product_service') and st.session_state.product_service else product_service
 
208
 
209
  # Get the instruction using the formula
210
  instruction = create_offer_instruction(
211
+ target_audience=target_audience_value,
212
+ product_service=product_service_value,
213
  selected_formula_name=st.session_state.formula_type,
214
  file_content=file_content,
215
  skills=skills_value
 
221
  bullet_content = st.session_state.file_content
222
 
223
  instruction += create_bullet_instruction(
224
+ target_audience=target_audience_value,
225
  product_service=product_service_value,
226
  uploaded_content=bullet_content,
227
  skills=skills_value
 
229
 
230
  # Add instruction for generating bonuses that complement the offer
231
  instruction += create_bonus_instruction(
232
+ target_audience=target_audience_value,
233
+ product_service=product_service_value,
234
  selected_formula_name=st.session_state.formula_type,
235
  uploaded_content=bullet_content,
236
  skills=skills_value