Spaces:
Running
Running
roni
commited on
Commit
·
6441ca8
1
Parent(s):
9608c6c
multi index support + limit increase
Browse files- app.py +2 -2
- get_index.py +1 -1
app.py
CHANGED
@@ -25,7 +25,7 @@ def search_and_display(seq, n_res, index_selection):
|
|
25 |
|
26 |
|
27 |
def limit_n_results(n):
|
28 |
-
return max(min(n,
|
29 |
|
30 |
|
31 |
def update_dropdown_menu(search_res):
|
@@ -117,7 +117,7 @@ with gr.Blocks() as demo:
|
|
117 |
n_results = gr.Number(10, label="N Results")
|
118 |
index_selector = gr.Dropdown(
|
119 |
choices=available_indexes,
|
120 |
-
value="
|
121 |
multiselect=False,
|
122 |
visible=True,
|
123 |
label="Index",
|
|
|
25 |
|
26 |
|
27 |
def limit_n_results(n):
|
28 |
+
return max(min(n, 100), 1)
|
29 |
|
30 |
|
31 |
def update_dropdown_menu(search_res):
|
|
|
117 |
n_results = gr.Number(10, label="N Results")
|
118 |
index_selector = gr.Dropdown(
|
119 |
choices=available_indexes,
|
120 |
+
value="PDB",
|
121 |
multiselect=False,
|
122 |
visible=True,
|
123 |
label="Index",
|
get_index.py
CHANGED
@@ -24,6 +24,6 @@ def get_engines(index_repo: str, model_repo: str):
|
|
24 |
subindex_paths = glob(str(index_path / "*/"))
|
25 |
engines = {}
|
26 |
for subindex_path in subindex_paths:
|
27 |
-
subindex_name = os.path.basename(subindex_path)
|
28 |
engines[subindex_name] = ProteinSearchEngine(data_path=Path(subindex_path))
|
29 |
return engines
|
|
|
24 |
subindex_paths = glob(str(index_path / "*/"))
|
25 |
engines = {}
|
26 |
for subindex_path in subindex_paths:
|
27 |
+
subindex_name = os.path.basename(subindex_path)
|
28 |
engines[subindex_name] = ProteinSearchEngine(data_path=Path(subindex_path))
|
29 |
return engines
|