Spaces:
Sleeping
Sleeping
update API variables
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: gray
|
|
|
|
| 1 |
---
|
| 2 |
+
title: BIOSCAN-Browser Backend
|
| 3 |
emoji: π
|
| 4 |
colorFrom: pink
|
| 5 |
colorTo: gray
|
app.py
CHANGED
|
@@ -118,10 +118,10 @@ with gr.Blocks() as demo:
|
|
| 118 |
rand_id_indx = gr.Textbox(label="Index:")
|
| 119 |
id_btn = gr.Button("Get Random ID")
|
| 120 |
with gr.Column():
|
| 121 |
-
|
| 122 |
-
|
| 123 |
|
| 124 |
-
|
| 125 |
choices=["FlatIP(default)", "FlatL2", "HNSWFlat", "IVFFlat", "LSH"], label="Index:", value="FlatIP(default)"
|
| 126 |
)
|
| 127 |
process_id = gr.Textbox(label="ID:", info="Enter a sample ID to search for")
|
|
@@ -129,7 +129,7 @@ with gr.Blocks() as demo:
|
|
| 129 |
search_btn = gr.Button("Search")
|
| 130 |
id_btn.click(fn=getRandID, inputs=[], outputs=[rand_id, rand_id_indx])
|
| 131 |
|
| 132 |
-
search_btn.click(fn=searchEmbeddings, inputs=[process_id,
|
| 133 |
|
| 134 |
|
| 135 |
demo.launch()
|
|
|
|
| 118 |
rand_id_indx = gr.Textbox(label="Index:")
|
| 119 |
id_btn = gr.Button("Get Random ID")
|
| 120 |
with gr.Column():
|
| 121 |
+
key_type = gr.Radio(choices=["DNA", "Image"], label="Search From:")
|
| 122 |
+
query_type = gr.Radio(choices=["DNA", "Image"], label="Search To:")
|
| 123 |
|
| 124 |
+
index_type = gr.Radio(
|
| 125 |
choices=["FlatIP(default)", "FlatL2", "HNSWFlat", "IVFFlat", "LSH"], label="Index:", value="FlatIP(default)"
|
| 126 |
)
|
| 127 |
process_id = gr.Textbox(label="ID:", info="Enter a sample ID to search for")
|
|
|
|
| 129 |
search_btn = gr.Button("Search")
|
| 130 |
id_btn.click(fn=getRandID, inputs=[], outputs=[rand_id, rand_id_indx])
|
| 131 |
|
| 132 |
+
search_btn.click(fn=searchEmbeddings, inputs=[process_id, key_type, query_type, index_type], outputs=[process_id_list])
|
| 133 |
|
| 134 |
|
| 135 |
demo.launch()
|