Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,7 +111,7 @@ def predict_bind(base_model_path,PEFT_model_path,input_seq):
|
|
| 111 |
tokenizer = AutoTokenizer.from_pretrained(base_model_path)
|
| 112 |
|
| 113 |
# Tokenize the sequence
|
| 114 |
-
inputs = tokenizer(
|
| 115 |
|
| 116 |
# Run the model
|
| 117 |
with torch.no_grad():
|
|
@@ -380,7 +380,7 @@ with demo:
|
|
| 380 |
""" Pick a base model and press **Finetune Pre-trained Model!"""
|
| 381 |
)
|
| 382 |
with gr.Row():
|
| 383 |
-
with gr.Column(scale=
|
| 384 |
base_model_name = gr.Dropdown(
|
| 385 |
choices=MODEL_OPTIONS,
|
| 386 |
value=MODEL_OPTIONS[0],
|
|
@@ -393,7 +393,7 @@ with demo:
|
|
| 393 |
label="PEFT Model Name",
|
| 394 |
interactive = True,
|
| 395 |
)
|
| 396 |
-
with gr.Column(scale=
|
| 397 |
name = gr.Dropdown(
|
| 398 |
label="Choose a Sample Protein",
|
| 399 |
value="Default protein",
|
|
@@ -412,13 +412,13 @@ with demo:
|
|
| 412 |
placeholder="Paste your protein sequence here...",
|
| 413 |
interactive = True,
|
| 414 |
)
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
with gr.Row():
|
| 423 |
with gr.Column(variant="compact", scale = 5):
|
| 424 |
output_text = gr.Textbox(
|
|
|
|
| 111 |
tokenizer = AutoTokenizer.from_pretrained(base_model_path)
|
| 112 |
|
| 113 |
# Tokenize the sequence
|
| 114 |
+
inputs = tokenizer(input_seq, return_tensors="pt", truncation=True, max_length=1024, padding='max_length')
|
| 115 |
|
| 116 |
# Run the model
|
| 117 |
with torch.no_grad():
|
|
|
|
| 380 |
""" Pick a base model and press **Finetune Pre-trained Model!"""
|
| 381 |
)
|
| 382 |
with gr.Row():
|
| 383 |
+
with gr.Column(scale=5, variant="compact"):
|
| 384 |
base_model_name = gr.Dropdown(
|
| 385 |
choices=MODEL_OPTIONS,
|
| 386 |
value=MODEL_OPTIONS[0],
|
|
|
|
| 393 |
label="PEFT Model Name",
|
| 394 |
interactive = True,
|
| 395 |
)
|
| 396 |
+
with gr.Column(scale=5, variant="compact"):
|
| 397 |
name = gr.Dropdown(
|
| 398 |
label="Choose a Sample Protein",
|
| 399 |
value="Default protein",
|
|
|
|
| 412 |
placeholder="Paste your protein sequence here...",
|
| 413 |
interactive = True,
|
| 414 |
)
|
| 415 |
+
with gr.Column(variant="compact", scale = 2):
|
| 416 |
+
predict_btn = gr.Button(
|
| 417 |
+
value="Predict binding site",
|
| 418 |
+
interactive=True,
|
| 419 |
+
variant="primary",
|
| 420 |
+
)
|
| 421 |
+
plot_struc_btn = gr.Button(value = "Plot ESMFold Predicted Structure ", variant="primary")
|
| 422 |
with gr.Row():
|
| 423 |
with gr.Column(variant="compact", scale = 5):
|
| 424 |
output_text = gr.Textbox(
|