Spaces:
Sleeping
Sleeping
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() | |