Spaces:
Sleeping
Sleeping
File size: 912 Bytes
30ef6e4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import fn
import gradio as gr
with gr.Blocks() as demo:
gr.Markdown('# vector_search')
with gr.Tab('write'):
info = gr.Markdown()
with gr.Tab('search'):
with gr.Row():
name = gr.Textbox(
lines=1,
label='name',
interactive=True,
show_copy_button=True,
)
query = gr.Textbox(
lines=1,
label='query',
interactive=True,
show_copy_button=True,
)
result = gr.Textbox(
label='result',
lines=20,
show_copy_button=True,
)
search_button = gr.Button(value='search')
search_button.click(
fn=fn.search,
inputs=[name, query],
outputs=[result],
)
if __name__ == '__main__':
demo.launch()
|