File size: 698 Bytes
ee2309a
 
 
fb96dd8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
import pandas as pd

dictionary = pd.read_csv("corncob_lowercase.txt",
                         header = None, 
                        columns = ['word'])

def spell_bee_solver(no_centre, centre):
    spell_bee_solver = dictionary[dictionary['word'].isin('centre')]
    return(spell_bee_solver)

with gr.Blocks() as app:
    with gr.Row():
        no_centre = gr.Textbox(label = 'Letters Outside of Centre')
        centre = gr.Textbox(label = 'Centre Letter')
    with gr.Row():
        solve_button = gr.Button(value = 'Solve')
    with gr.Row():
        output_df = gr.DataFrame()
    solve_button.click(spell_bee_solver, inputs = [no_centre, centre], outputs = [output_df])