Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ model_promoter = AutoModelForSequenceClassification.from_pretrained("llm_promote
|
|
| 32 |
model_promoter.eval()
|
| 33 |
|
| 34 |
# D. Multi-Feature LightGBM
|
| 35 |
-
lgbm_path = hf_hub_download(repo_id="Geonomic/Genomic-Oracle-Weights", filename="
|
| 36 |
raw_lgbm = joblib.load(lgbm_path)
|
| 37 |
|
| 38 |
# If it's a dictionary, print the keys to the log and try to extract the model
|
|
@@ -57,8 +57,12 @@ model_pheno = BertForSequenceClassification.from_pretrained("Geonomic/Genomic-Or
|
|
| 57 |
model_pheno.eval()
|
| 58 |
|
| 59 |
FEATURE_DICT = {
|
| 60 |
-
0: "
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
# ==============================================
|
|
@@ -115,7 +119,7 @@ def run_deep_learning_cascade(dna_sequence):
|
|
| 115 |
raw_scores["Phenotype (Lean)"] = prob_lean
|
| 116 |
|
| 117 |
# BRANCH B: Promoter Validation (Triggered if Non-Coding AND is Promoter/Enhancer)
|
| 118 |
-
elif not is_coding and lgb_prediction
|
| 119 |
inputs_promo = tokenizer_promoter([clean_seq], return_tensors="pt", max_length=300, truncation=True, padding=True).to(device)
|
| 120 |
|
| 121 |
with torch.no_grad():
|
|
|
|
| 32 |
model_promoter.eval()
|
| 33 |
|
| 34 |
# D. Multi-Feature LightGBM
|
| 35 |
+
lgbm_path = hf_hub_download(repo_id="Geonomic/Genomic-Oracle-Weights", filename="dnabert_lightgbm_model_feature_type_v2.pkl")
|
| 36 |
raw_lgbm = joblib.load(lgbm_path)
|
| 37 |
|
| 38 |
# If it's a dictionary, print the keys to the log and try to extract the model
|
|
|
|
| 57 |
model_pheno.eval()
|
| 58 |
|
| 59 |
FEATURE_DICT = {
|
| 60 |
+
0: "Gene/Transcript (Coding/mRNA)",
|
| 61 |
+
1: "Regulatory Region (Promoter/Enhancer/Silencer)",
|
| 62 |
+
2: "Long Non-Coding RNA (lncRNA)",
|
| 63 |
+
3: "Small/Transfer RNA (snRNA/miRNA/tRNA)",
|
| 64 |
+
4: "Repeat Region / Mobile Genetic Element",
|
| 65 |
+
5: "Pseudogene"
|
| 66 |
}
|
| 67 |
|
| 68 |
# ==============================================
|
|
|
|
| 119 |
raw_scores["Phenotype (Lean)"] = prob_lean
|
| 120 |
|
| 121 |
# BRANCH B: Promoter Validation (Triggered if Non-Coding AND is Promoter/Enhancer)
|
| 122 |
+
elif not is_coding and lgb_prediction == 1:
|
| 123 |
inputs_promo = tokenizer_promoter([clean_seq], return_tensors="pt", max_length=300, truncation=True, padding=True).to(device)
|
| 124 |
|
| 125 |
with torch.no_grad():
|