JeCabrera commited on
Commit
2406c37
·
verified ·
1 Parent(s): 3623ca3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -347,10 +347,8 @@ if submit_ad:
347
  if not isinstance(generated_ad, str):
348
  st.error("Error al generar el anuncio")
349
  else:
350
- # Clean the generated ad text to remove any random characters
351
- # Remove any single letters that appear on their own line
352
- cleaned_ad = "\n".join([line for line in generated_ad.split("\n")
353
- if not (len(line.strip()) == 1 and line.strip().isalpha())])
354
 
355
  # Display only the ad without separate headline and without storing in session state
356
  st.markdown(f"""
 
347
  if not isinstance(generated_ad, str):
348
  st.error("Error al generar el anuncio")
349
  else:
350
+ # Clean the generated ad text
351
+ cleaned_ad = clean_ad_text(generated_ad)
 
 
352
 
353
  # Display only the ad without separate headline and without storing in session state
354
  st.markdown(f"""