Update app.py
Browse files
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
|
| 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 |
-
"
|
| 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)]
|
| 109 |
],
|
| 110 |
-
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
| 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__":
|