IlyaGusev commited on
Commit
b44e211
1 Parent(s): bae83dd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -3
README.md CHANGED
@@ -25,7 +25,7 @@ model_name = "IlyaGusev/ru-word-stress-transformer"
25
  tokenizer = AutoTokenizer.from_pretrained(
26
  model_name,
27
  trust_remote_code=True,
28
- revision="3400828"
29
  )
30
  model = AutoModelForTokenClassification.from_pretrained(model_name)
31
  pipe = pipeline(
@@ -36,5 +36,10 @@ pipe = pipeline(
36
  aggregation_strategy="none",
37
  ignore_labels=("NO",)
38
  )
39
- print(pipe("щеколда"))
40
- ```
 
 
 
 
 
 
25
  tokenizer = AutoTokenizer.from_pretrained(
26
  model_name,
27
  trust_remote_code=True,
28
+ revision="bae83dd"
29
  )
30
  model = AutoModelForTokenClassification.from_pretrained(model_name)
31
  pipe = pipeline(
 
36
  aggregation_strategy="none",
37
  ignore_labels=("NO",)
38
  )
39
+ text = "щеколда"
40
+ print(text)
41
+ index = pipe(text)[0]["index"]
42
+ print(text[:index] + "'" + text[index:])
43
+ ```
44
+
45
+ Colab: [link](https://colab.research.google.com/drive/1I61aDezhxMVZzHQQfpn7Wqn-ydbndO6i)