Update model.py
Browse files
model.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import AutoTokenizer, TextClassificationPipeline, AutoModelForSequenceClassification;
|
| 2 |
import torch
|
| 3 |
|
| 4 |
-
class
|
| 5 |
def __init__(self, repo_id, power_device=None):
|
| 6 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 7 |
|
|
|
|
| 1 |
from transformers import AutoTokenizer, TextClassificationPipeline, AutoModelForSequenceClassification;
|
| 2 |
import torch
|
| 3 |
|
| 4 |
+
class MajorClassifier(TextClassificationPipeline):
|
| 5 |
def __init__(self, repo_id, power_device=None):
|
| 6 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 7 |
|