Spaces:
Build error
Build error
File size: 473 Bytes
c3380a9 896c160 c3380a9 0ecbdf8 c3380a9 eb1aa98 c3380a9 ff7e5af c3380a9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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()
|