atwang commited on
Commit
73ff1bb
β€’
1 Parent(s): 142b745

update API variables

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +4 -4
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Bioscan Updated Ids
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
- mod1 = gr.Radio(choices=["DNA", "Image"], label="Search From:")
122
- mod2 = gr.Radio(choices=["DNA", "Image"], label="Search To:")
123
 
124
- indexType = 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,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, mod1, mod2, indexType], outputs=[process_id_list])
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()