Spaces:
Sleeping
Sleeping
bradley6597
commited on
Commit
•
fb96dd8
1
Parent(s):
ee2309a
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,20 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
|
4 |
-
dictionary = pd.read_csv("corncob_lowercase.txt",
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
|
4 |
+
dictionary = pd.read_csv("corncob_lowercase.txt",
|
5 |
+
header = None,
|
6 |
+
columns = ['word'])
|
7 |
+
|
8 |
+
def spell_bee_solver(no_centre, centre):
|
9 |
+
spell_bee_solver = dictionary[dictionary['word'].isin('centre')]
|
10 |
+
return(spell_bee_solver)
|
11 |
+
|
12 |
+
with gr.Blocks() as app:
|
13 |
+
with gr.Row():
|
14 |
+
no_centre = gr.Textbox(label = 'Letters Outside of Centre')
|
15 |
+
centre = gr.Textbox(label = 'Centre Letter')
|
16 |
+
with gr.Row():
|
17 |
+
solve_button = gr.Button(value = 'Solve')
|
18 |
+
with gr.Row():
|
19 |
+
output_df = gr.DataFrame()
|
20 |
+
solve_button.click(spell_bee_solver, inputs = [no_centre, centre], outputs = [output_df])
|