rafaelm47labs commited on
Commit
2752691
1 Parent(s): cc58195

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -0
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ** This is work in progress **
2
+
3
+ Spanish News Classification Headlines
4
+
5
+ SNCH: is a model for sequence classification trained on private dataset. The the model will output the probability of a label('ciencia_tecnologia','clickbait','cultura','deportes','economia','educacion','medio_ambiente', 'opinion','politica',
6
+ 'sociedad'), the arquitecture of the NN is only in Pytorch.
7
+
8
+
9
+ Example
10
+
11
+ The model can be accessed simply as 'M47Labs/spanish_news_classification_headlines' using the Transformers library. An example on how to download and use the models next:
12
+
13
+ import torch
14
+ from transformers import AutoTokenizer, BertForSequenceClassification,TextClassificationPipeline
15
+
16
+ review_text = 'los vehiculos que esten esperando pasajaeros deberan estar apagados para reducir emisiones'
17
+ path = "M47Labs/spanish_news_classification_headlines"
18
+ tokenizer = AutoTokenizer.from_pretrained(path)
19
+ model = BertForSequenceClassification.from_pretrained(path)
20
+
21
+ nlp = TextClassificationPipeline(task = "text-classification",
22
+ model = model,
23
+ tokenizer = tokenizer)
24
+
25
+ print(nlp(review_text))