--- title: TEM1 Target Finder emoji: 🧪 colorFrom: blue colorTo: green sdk: gradio sdk_version: 4.40.0 app_file: app.py pinned: false --- # TEM-1 Target Finder (Gradio on Hugging Face Spaces) This Space predicts small-molecule binding strength (pAff = −log10 Kd) to **TEM-1 β-lactamase** using: - **Protein** embeddings from ESM-2 (35M) - **Ligand** embeddings from ChemBERTa - Lightweight **XGBoost** regressor for pAff and **Logistic Regression** for binder probability, with isotonic calibration ## How to deploy 1. Create a new **Gradio** Space. 2. Upload the following files: - `app.py` - `requirements.txt` - *(optional)* `tem1_clean.csv` — your dataset with at least two columns: - `smiles` (string) - `pAff` (float; e.g., 6.0 for 1 µM) 3. If `tem1_clean.csv` is present, the Space will **train heads on startup** and show real metrics. If not present, it runs in **demo mode** with heuristic heads (usable but not scientifically calibrated). > You can place the CSV at `./tem1_clean.csv` or `./data/tem1_clean.csv`. ## Notes - Runs on **CPU** by default. First startup downloads ESM-2 and ChemBERTa from Hugging Face. - Batch plots support up to 100 SMILES pasted as lines or comma/semicolon separated. - pAff threshold **≥6** is used as a binder proxy (≈ ≤1 µM).