Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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=
|
212 |
-
|
213 |
selected_formula_name=st.session_state.formula_type,
|
214 |
file_content=file_content,
|
215 |
skills=skills_value # Add skills to the offer instruction
|
@@ -222,15 +222,15 @@ with col2:
|
|
222 |
|
223 |
instruction += create_bullet_instruction(
|
224 |
target_audience=target_audience,
|
225 |
-
|
226 |
uploaded_content=bullet_content,
|
227 |
skills=skills_value # Add skills to the bullet instruction
|
228 |
)
|
229 |
|
230 |
# Add instruction for generating bonuses that complement the offer
|
231 |
instruction += create_bonus_instruction(
|
232 |
-
|
233 |
-
|
234 |
selected_formula_name=st.session_state.formula_type,
|
235 |
uploaded_content=bullet_content, # Pass the file content to bonus generator too
|
236 |
skills=skills_value # Add skills to the bonus instruction
|
|
|
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 |
|
209 |
# Get the instruction using the formula
|
210 |
instruction = create_offer_instruction(
|
211 |
+
target_audience=target_audience,
|
212 |
+
product_service=product_service_value,
|
213 |
selected_formula_name=st.session_state.formula_type,
|
214 |
file_content=file_content,
|
215 |
skills=skills_value # Add skills to the offer instruction
|
|
|
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 # Add skills to the bullet instruction
|
228 |
)
|
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,
|
234 |
selected_formula_name=st.session_state.formula_type,
|
235 |
uploaded_content=bullet_content, # Pass the file content to bonus generator too
|
236 |
skills=skills_value # Add skills to the bonus instruction
|