Kseniia-Kholina commited on
Commit
299ebbf
·
verified ·
1 Parent(s): af69adc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -89,7 +89,7 @@ def process_sequence(sequence, domain_bounds, n):
89
 
90
  df = pd.DataFrame({
91
  'Original Residue': original_residues,
92
- 'Predicted Residues (in order of decreasing likelihood)': mutations,
93
  'Position': positions
94
  })
95
 
@@ -98,17 +98,21 @@ def process_sequence(sequence, domain_bounds, n):
98
  demo = gr.Interface(
99
  fn=process_sequence,
100
  inputs=[
101
- "text",
102
  gr.Dataframe(
103
  headers=["start", "end"],
104
  datatype=["number", "number"],
105
  row_count=(1, "fixed"),
106
  col_count=(2, "fixed"),
 
107
  ),
108
- gr.Dropdown([i for i in range(1, 21)]), # Dropdown with numbers from 1 to 20 as integers
109
  ],
110
- outputs=["dataframe", "image"],
111
- description="Choose a number between 1-20 to predict n tokens for each position. Choose the start and end index of the domain of interest (indexing starts at 1).",
 
 
 
112
  )
113
 
114
  if __name__ == "__main__":
 
89
 
90
  df = pd.DataFrame({
91
  'Original Residue': original_residues,
92
+ 'Predicted Residues': mutations,
93
  'Position': positions
94
  })
95
 
 
98
  demo = gr.Interface(
99
  fn=process_sequence,
100
  inputs=[
101
+ gr.Textbox(label="Sequence", placeholder="Enter the protein sequence here"),
102
  gr.Dataframe(
103
  headers=["start", "end"],
104
  datatype=["number", "number"],
105
  row_count=(1, "fixed"),
106
  col_count=(2, "fixed"),
107
+ label="Domain Bounds"
108
  ),
109
+ gr.Dropdown([i for i in range(1, 21)], label="Top N Tokens"),
110
  ],
111
+ outputs=[
112
+ gr.Dataframe(label="Predicted Tokens (in order of decreasing likelihood)"),
113
+ gr.Image(type="pil", label="Heatmap"),
114
+ ],
115
+ description="Choose a number from the dropdown to predict N tokens for each position. Choose the start and end index of the domain of interest (indexing starts at 1).",
116
  )
117
 
118
  if __name__ == "__main__":