Spaces:
No application file
No application file
Update predictor.py
Browse files- predictor.py +4 -7
predictor.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
-
"""
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
Original file is located at
|
| 7 |
-
https://colab.research.google.com/drive/1JURb-0j-R4LWK3oxeGrNxpJm3V6nnX02
|
| 8 |
"""
|
| 9 |
|
| 10 |
import torch
|
|
@@ -311,7 +308,7 @@ class EnhancedPostProcessor:
|
|
| 311 |
class GenePredictor:
|
| 312 |
"""Handles gene prediction using the trained boundary-aware model."""
|
| 313 |
|
| 314 |
-
def __init__(self, model_path: str = '
|
| 315 |
device: str = 'cuda' if torch.cuda.is_available() else 'cpu'):
|
| 316 |
self.device = device
|
| 317 |
self.model = BoundaryAwareGenePredictor(input_dim=14).to(device)
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
Gene Prediction Model - predictor.py
|
| 4 |
+
Boundary-aware deep learning model for gene prediction
|
|
|
|
|
|
|
|
|
|
| 5 |
"""
|
| 6 |
|
| 7 |
import torch
|
|
|
|
| 308 |
class GenePredictor:
|
| 309 |
"""Handles gene prediction using the trained boundary-aware model."""
|
| 310 |
|
| 311 |
+
def __init__(self, model_path: str = 'best_boundary_aware_model.pth',
|
| 312 |
device: str = 'cuda' if torch.cuda.is_available() else 'cpu'):
|
| 313 |
self.device = device
|
| 314 |
self.model = BoundaryAwareGenePredictor(input_dim=14).to(device)
|