rawshal commited on
Commit
9b8f97d
·
verified ·
1 Parent(s): 488ab72

Update pages/2_Pest_Control_Report.py

Browse files
Files changed (1) hide show
  1. pages/2_Pest_Control_Report.py +7 -4
pages/2_Pest_Control_Report.py CHANGED
@@ -181,21 +181,24 @@ if st.button("🚀 Generate Pest Control Report", type="primary", use_container_
181
  with st.spinner("⚙️ Assembling Pest Control Dossier... Please wait."):
182
  with tempfile.TemporaryDirectory() as tmp_dir:
183
 
184
- # BUG FIX: Initializing RichText with text immediately and using \a (Paragraph Break)
185
  if "General" in service_type and gen_text:
186
- rt_gen = RichText("General Pest control Service\a", bold=True)
 
187
  rt_gen.add(gen_text)
188
  else:
189
  rt_gen = ""
190
 
191
  if "Rodent" in service_type and rodent_text:
192
- rt_rod = RichText("Rodent Control service\a", bold=True)
 
193
  rt_rod.add(rodent_text)
194
  else:
195
  rt_rod = ""
196
 
197
  if toggle_remarks and remarks_text:
198
- rt_rem = RichText("Site Specific Recommendation\a", bold=True)
 
199
  rt_rem.add(remarks_text)
200
  else:
201
  rt_rem = ""
 
181
  with st.spinner("⚙️ Assembling Pest Control Dossier... Please wait."):
182
  with tempfile.TemporaryDirectory() as tmp_dir:
183
 
184
+ # BUG FIX: Swapped '\a' back to '\n'. Valid XML formatting.
185
  if "General" in service_type and gen_text:
186
+ rt_gen = RichText()
187
+ rt_gen.add("General Pest control Service\n", bold=True)
188
  rt_gen.add(gen_text)
189
  else:
190
  rt_gen = ""
191
 
192
  if "Rodent" in service_type and rodent_text:
193
+ rt_rod = RichText()
194
+ rt_rod.add("Rodent Control service\n", bold=True)
195
  rt_rod.add(rodent_text)
196
  else:
197
  rt_rod = ""
198
 
199
  if toggle_remarks and remarks_text:
200
+ rt_rem = RichText()
201
+ rt_rem.add("Site Specific Recommendation\n", bold=True)
202
  rt_rem.add(remarks_text)
203
  else:
204
  rt_rem = ""