macedonizer commited on
Commit
9ff7799
1 Parent(s): 9b3af62

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -18,8 +18,8 @@ You can use this model directly with a pipeline for masked language modeling: \
18
 
19
  from transformers import pipeline \
20
  unmasker = pipeline('fill-mask', model='macedonizer/mk-roberta-base') \
21
- unmasker("Скопје е <mask> град на Македонија.") \
22
- \
23
  [{'sequence': 'Скопје е главен град на Македонија.', \
24
  'score': 0.5900368094444275, \
25
  'token': 2782, \
@@ -40,7 +40,7 @@ unmasker("Скопје е <mask> град на Македонија.") \
40
  'score': 0.01312252413481474, \
41
  'token': 4271, \
42
  'token_str': ' најголемиот'}] \
43
- \
44
  Here is how to use this model to get the features of a given text in PyTorch:
45
 
46
  from transformers import RobertaTokenizer, RobertaModel \
@@ -48,4 +48,4 @@ tokenizer = RobertaTokenizer.from_pretrained('macedonizer/mk-roberta-base') \
48
  model = RobertaModel.from_pretrained('macedonizer/mk-roberta-base') \
49
  text = "Replace me by any text you'd like." \
50
  encoded_input = tokenizer(text, return_tensors='pt') \
51
- output = model(**encoded_input) \
 
18
 
19
  from transformers import pipeline \
20
  unmasker = pipeline('fill-mask', model='macedonizer/mk-roberta-base') \
21
+ unmasker("Скопје е \<mask\> град на Македонија.") \
22
+
23
  [{'sequence': 'Скопје е главен град на Македонија.', \
24
  'score': 0.5900368094444275, \
25
  'token': 2782, \
 
40
  'score': 0.01312252413481474, \
41
  'token': 4271, \
42
  'token_str': ' најголемиот'}] \
43
+
44
  Here is how to use this model to get the features of a given text in PyTorch:
45
 
46
  from transformers import RobertaTokenizer, RobertaModel \
 
48
  model = RobertaModel.from_pretrained('macedonizer/mk-roberta-base') \
49
  text = "Replace me by any text you'd like." \
50
  encoded_input = tokenizer(text, return_tensors='pt') \
51
+ output = model(**encoded_input)