roni commited on
Commit
5e7a3eb
·
1 Parent(s): 6441ca8

limit increase

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -13,7 +13,7 @@ app_description = """
13
  This application enables a quick protein-peptide binding search based on sequences.
14
  You can use it to search the full [PDB](https://www.rcsb.org/) database or in a specific organism genome.
15
  """
16
-
17
 
18
  def search_and_display(seq, n_res, index_selection):
19
  n_res = int(limit_n_results(n_res))
@@ -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, 100), 1)
29
 
30
 
31
  def update_dropdown_menu(search_res):
@@ -123,7 +123,9 @@ with gr.Blocks() as demo:
123
  label="Index",
124
  )
125
  search_button = gr.Button("Search", variant="primary")
126
- search_results = gr.Label(num_top_classes=20, label="Search Results")
 
 
127
  viz_header = gr.Markdown("## Visualization", visible=False)
128
  results_selector = gr.Dropdown(
129
  choices=[],
 
13
  This application enables a quick protein-peptide binding search based on sequences.
14
  You can use it to search the full [PDB](https://www.rcsb.org/) database or in a specific organism genome.
15
  """
16
+ max_results = 100
17
 
18
  def search_and_display(seq, n_res, index_selection):
19
  n_res = int(limit_n_results(n_res))
 
25
 
26
 
27
  def limit_n_results(n):
28
+ return max(min(n, max_results), 1)
29
 
30
 
31
  def update_dropdown_menu(search_res):
 
123
  label="Index",
124
  )
125
  search_button = gr.Button("Search", variant="primary")
126
+ search_results = gr.Label(
127
+ num_top_classes=max_results, label="Search Results"
128
+ )
129
  viz_header = gr.Markdown("## Visualization", visible=False)
130
  results_selector = gr.Dropdown(
131
  choices=[],