VibecoderMcSwaggins commited on
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

Files changed (1) hide show
  1. app.py +33 -34
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
- with gr.Group():
240
- gr.HTML(
241
- '<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>'
242
- )
243
- sequence_input = gr.TextArea(
244
- placeholder="Paste amino acid sequence here (e.g., QVQL...)",
245
- lines=5,
246
- max_lines=15,
247
- show_copy_button=True,
248
- show_label=False, # Disable built-in label
249
- )
250
 
251
- with gr.Accordion("⚙️ Advanced Settings", open=False), gr.Row():
252
- with gr.Column():
253
- gr.HTML(
254
- '<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>'
255
- )
256
- assay_input = gr.Dropdown(
257
- choices=["ELISA", "PSR", "None"],
258
- value="None",
259
- show_label=False,
260
- info="Use threshold calibrated for specific assay",
261
- )
262
- with gr.Column():
263
- gr.HTML(
264
- '<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>'
265
- )
266
- threshold_input = gr.Slider(
267
- minimum=0.0,
268
- maximum=1.0,
269
- value=0.5,
270
- step=0.05,
271
- show_label=False,
272
- info="Probability cutoff for non-specificity",
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"