JeCabrera commited on
Commit
d0bb882
·
verified ·
1 Parent(s): 47d79bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -209,22 +209,16 @@ with col2:
209
 
210
  # Create the base instruction
211
  instruction = create_offer_instruction(
212
- avatar_description=avatar_description,
213
- product_name=product_name,
214
- selected_formula_name=selected_formula_name,
215
- offer_formulas=offer_formulas
216
  )
217
 
218
- # If you have additional context to add
219
- additional_context = ""
220
-
221
  # Add file content if available
222
  if st.session_state.input_type in ["file", "both"]:
223
- additional_context = f"\n\nAdditional context from uploaded file:\n{st.session_state.file_content}"
224
-
225
- # Now add the additional context to the instruction
226
- if additional_context:
227
- instruction += additional_context
228
 
229
  # Generate the response
230
  response = model.generate_content(instruction)
 
209
 
210
  # Create the base instruction
211
  instruction = create_offer_instruction(
212
+ avatar_description=avatar_description,
213
+ product_name=product_name,
214
+ selected_formula_name=selected_formula_name,
215
+ offer_formulas=offer_formulas
216
  )
217
 
 
 
 
218
  # Add file content if available
219
  if st.session_state.input_type in ["file", "both"]:
220
+ additional_context = f"\n\nAdditional context from uploaded file:\n{st.session_state.file_content}"
221
+ instruction += additional_context
 
 
 
222
 
223
  # Generate the response
224
  response = model.generate_content(instruction)