Spaces:
Sleeping
Sleeping
Update app.py
Browse files33 unmodified lines34353637373839404142434445464733 unmodified linesdef correct_text(text): spell = SpellChecker(language='es') # Usamos espa帽ol para la correcci贸n words = text.split() # Separar el texto en palabras corrected_words = [spell.correction(word) for word in words] # Corregir las palabras corrected_words = []
for word in words: corrected = spell.correction(word) if corrected is None: # Si no se encuentra correcci贸n, dejamos la palabra original corrected = word corrected_words.append(corrected)
corrected_text = " ".join(corrected_words) # Volver a unir las palabras return corrected_text
app.py+8-1