Update pipeline.py
Browse files- pipeline.py +4 -0
pipeline.py
CHANGED
@@ -15,6 +15,10 @@ class PreTrainedPipeline():
|
|
15 |
nltk.download('punkt')
|
16 |
self.model = AutoModelForSeq2SeqLM.from_pretrained(path)
|
17 |
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
|
|
|
|
|
|
|
|
18 |
|
19 |
self.model_type="t5"
|
20 |
# self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
15 |
nltk.download('punkt')
|
16 |
self.model = AutoModelForSeq2SeqLM.from_pretrained(path)
|
17 |
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
18 |
+
print("Loading pipe")
|
19 |
+
self.pipe = pipeline("text-classification", model="p-christ/QandAClassifier")
|
20 |
+
print("Pipe loaded")
|
21 |
+
|
22 |
|
23 |
self.model_type="t5"
|
24 |
# self.device = "cuda" if torch.cuda.is_available() else "cpu"
|