Update README.md
Browse filesdocs: fixing Using Example stuff
README.md
CHANGED
@@ -94,16 +94,17 @@ import torch
|
|
94 |
from transformers import RobertaTokenizer, RobertaForSequenceClassification
|
95 |
|
96 |
|
97 |
-
model_name = '
|
98 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
99 |
|
100 |
tokenizer = RobertaTokenizer.from_pretrained(model_name)
|
|
|
101 |
|
102 |
class BERTClass(torch.nn.Module):
|
103 |
def __init__(self):
|
104 |
super(BERTClass, self).__init__()
|
105 |
self.bert_model = RobertaForSequenceClassification.from_pretrained(
|
106 |
-
|
107 |
return_dict=True,
|
108 |
problem_type='multi_label_classification',
|
109 |
num_labels=50
|
|
|
94 |
from transformers import RobertaTokenizer, RobertaForSequenceClassification
|
95 |
|
96 |
|
97 |
+
model_name = 'ai-forever/ruRoberta-large'
|
98 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
99 |
|
100 |
tokenizer = RobertaTokenizer.from_pretrained(model_name)
|
101 |
+
class_descriptions = pd.read_csv('files/trends_description.csv')
|
102 |
|
103 |
class BERTClass(torch.nn.Module):
|
104 |
def __init__(self):
|
105 |
super(BERTClass, self).__init__()
|
106 |
self.bert_model = RobertaForSequenceClassification.from_pretrained(
|
107 |
+
'metanovus/ruroberta-ecom-tech-best',
|
108 |
return_dict=True,
|
109 |
problem_type='multi_label_classification',
|
110 |
num_labels=50
|