File size: 478 Bytes
fbc7e49
 
 
 
 
 
 
 
 
 
 
 
020a7f7
fbc7e49
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr

def run_query(query_string: str):
    meal_string = f"Oh you want {query_string}. Go have a think yourself then."
    pass

with gr.Blocks() as meal_search:
    gr.Markdown("Start typing below and then click **Run** to see the output.")
    with gr.Row():
        inp = gr.Textbox(placeholder="What sort of meal are you after?")
        out = gr.Textbox()
    btn = gr.Button("Run")
    btn.click(fn=run_query, inputs=inp, outputs=out)

meal_search.launch()