import streamlit as st from spellchecker import SpellChecker spell = SpellChecker() input_string = st.text_area('Please input a word with a typo for spell checking !!') if input_string: words = input_string.split() corrections = {} for word in words: corrected_word = spell.correction(word) if corrected_word != word: corrections[word] = corrected_word if corrections: st.write("Suggested corrections:") for original, corrected in corrections.items(): st.write(f"{original} -> {corrected}") else: st.write("No spelling mistakes found.")