import gradio as gr from symspellpy import SymSpell import autocorrect from autocorrect import Speller # def text_checker(inp_text): # updated_text = text_checker_pre(inp_text) # symsp = SymSpell() # symsp.load_dictionary('dictionay.txt',term_index=0, count_index=1, separator=' ') # sentence = updated_text # terms = symsp.lookup_compound(sentence,max_edit_distance=2) # return terms[0].term def text_checker(inp_text): check = Speller(lang='en') sentence = inp_text return check(sentence) title = "Misspell Correction" with gr.Blocks(title=title) as demo: gr.Markdown(f'