radames commited on
Commit
c3380a9
1 Parent(s): 449bd1f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pyenchant
3
+
4
+ block = gr.Blocks()
5
+
6
+ speller = enchant.Dict("en_US")
7
+
8
+
9
+ def predict(text):
10
+ return d.suggest(text)
11
+
12
+ with block:
13
+ text_input = gr.Text()
14
+ text_out = gr.Dataframe(headers=["Spells"], datatype=["str"])
15
+ btn = gr.Button()
16
+ btn.click(fn=predict, text_input, text_out)
17
+
18
+ block.launch()
19
+
20
+
21
+