Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ class NewsAnalytic():
|
|
13 |
self.model = T5ForZeroShotClassification.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
|
14 |
self.tokenizer = T5Tokenizer.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
|
15 |
self.classifier = ZeroShotClassificationPipeline(model=self.model, tokenizer=self.tokenizer,ypothesis_template = '{}', encoder_decoder = True)
|
|
|
16 |
print("load model berhasil!")
|
17 |
def anoted_sentence(self,content,candidate_labels):
|
18 |
sentences = nltk.sent_tokenize(content)
|
|
|
13 |
self.model = T5ForZeroShotClassification.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
|
14 |
self.tokenizer = T5Tokenizer.from_pretrained('knowledgator/comprehend_it-multilingual-t5-base')
|
15 |
self.classifier = ZeroShotClassificationPipeline(model=self.model, tokenizer=self.tokenizer,ypothesis_template = '{}', encoder_decoder = True)
|
16 |
+
nltk.download("punkt")
|
17 |
print("load model berhasil!")
|
18 |
def anoted_sentence(self,content,candidate_labels):
|
19 |
sentences = nltk.sent_tokenize(content)
|