Spaces:
Build error
Build error
| import gradio as gr | |
| import enchant | |
| block = gr.Blocks() | |
| speller = enchant.Dict("en_US") | |
| def predict(text): | |
| spells = speller.suggest(text) | |
| return [[s] for s in spells] | |
| with block: | |
| gr.Markdown("# Hello [PyEnchant](http://pyenchant.github.io/pyenchant/)") | |
| text_input = gr.Text() | |
| text_out = gr.Dataframe(headers=["Spells"], datatype=["str"]) | |
| btn = gr.Button() | |
| btn.click(fn=predict, inputs=text_input, outputs=text_out) | |
| block.launch() | |