Spaces:
Running
Running
import gradio as gr | |
from functions import * | |
# demo | |
output_list = [] | |
with gr.Blocks() as demo: | |
gr.Markdown("# YouTube Search") | |
with gr.Row(): | |
inp = gr.Textbox(placeholder="What are you looking for?", label="Query", scale=3) | |
btn = gr.Button("Search") | |
btn.click(fn=searchResults, inputs=inp, outputs=output_list) | |
for i in range(5): | |
with gr.Row(): | |
output_list.append(gr.HTML()) | |
output_list.append(gr.Markdown()) | |
inp.submit(fn=searchResults, inputs=inp, outputs=output_list) | |
demo.launch() |