Commit
·
2a95036
1
Parent(s):
4902c48
Initial deployment: Antibody non-specificity predictor
Browse files- ESM-1v (650M) + Logistic Regression
- Trained on Boughter dataset
- Pydantic v2 validation
- Gradio 5.x UI
app.py
CHANGED
|
@@ -236,41 +236,40 @@ with gr.Blocks(theme=theme, title="Antibody Predictor") as app:
|
|
| 236 |
with gr.Row(equal_height=False):
|
| 237 |
# Left Column: Inputs
|
| 238 |
with gr.Column(scale=1):
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
)
|
| 250 |
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
|
| 275 |
submit_btn = gr.Button(
|
| 276 |
"🔬 Predict Non-Specificity", variant="primary", size="lg"
|
|
|
|
| 236 |
with gr.Row(equal_height=False):
|
| 237 |
# Left Column: Inputs
|
| 238 |
with gr.Column(scale=1):
|
| 239 |
+
gr.HTML(
|
| 240 |
+
'<div style="background-color: #3B82F6; color: white; padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.875rem; display: inline-block; margin-bottom: 4px;">Antibody Sequence (VH or VL)</div>'
|
| 241 |
+
)
|
| 242 |
+
sequence_input = gr.TextArea(
|
| 243 |
+
placeholder="Paste amino acid sequence here (e.g., QVQL...)",
|
| 244 |
+
lines=5,
|
| 245 |
+
max_lines=15,
|
| 246 |
+
show_copy_button=True,
|
| 247 |
+
show_label=False, # Disable built-in label
|
| 248 |
+
)
|
|
|
|
| 249 |
|
| 250 |
+
with gr.Accordion("⚙️ Advanced Settings", open=False), gr.Row():
|
| 251 |
+
with gr.Column():
|
| 252 |
+
gr.HTML(
|
| 253 |
+
'<div style="background-color: #3B82F6; color: white; padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.875rem; display: inline-block; margin-bottom: 4px;">Calibrated Assay</div>'
|
| 254 |
+
)
|
| 255 |
+
assay_input = gr.Dropdown(
|
| 256 |
+
choices=["ELISA", "PSR", "None"],
|
| 257 |
+
value="None",
|
| 258 |
+
show_label=False,
|
| 259 |
+
info="Use threshold calibrated for specific assay",
|
| 260 |
+
)
|
| 261 |
+
with gr.Column():
|
| 262 |
+
gr.HTML(
|
| 263 |
+
'<div style="background-color: #3B82F6; color: white; padding: 4px 8px; border-radius: 4px; font-weight: 600; font-size: 0.875rem; display: inline-block; margin-bottom: 4px;">Decision Threshold</div>'
|
| 264 |
+
)
|
| 265 |
+
threshold_input = gr.Slider(
|
| 266 |
+
minimum=0.0,
|
| 267 |
+
maximum=1.0,
|
| 268 |
+
value=0.5,
|
| 269 |
+
step=0.05,
|
| 270 |
+
show_label=False,
|
| 271 |
+
info="Probability cutoff for non-specificity",
|
| 272 |
+
)
|
| 273 |
|
| 274 |
submit_btn = gr.Button(
|
| 275 |
"🔬 Predict Non-Specificity", variant="primary", size="lg"
|