Spaces:
Runtime error
Runtime error
Alexander Seifert
commited on
Commit
•
8778b89
1
Parent(s):
0bc7977
fix
Browse files- html/index.md +1 -1
- src/data.py +1 -1
html/index.md
CHANGED
@@ -17,7 +17,7 @@ pip install -r requirements.txt # you'll need Python 3.9+
|
|
17 |
make run
|
18 |
```
|
19 |
|
20 |
-
##
|
21 |
|
22 |
![](./screenshot.jpg)
|
23 |
|
|
|
17 |
make run
|
18 |
```
|
19 |
|
20 |
+
## Highlights
|
21 |
|
22 |
![](./screenshot.jpg)
|
23 |
|
src/data.py
CHANGED
@@ -78,7 +78,7 @@ def tokenize_and_align_labels(examples, tokenizer):
|
|
78 |
previous_word_idx = None
|
79 |
label_ids = []
|
80 |
for word_idx in word_ids:
|
81 |
-
if word_idx
|
82 |
label_ids.append(-100)
|
83 |
else:
|
84 |
label_ids.append(label[word_idx])
|
|
|
78 |
previous_word_idx = None
|
79 |
label_ids = []
|
80 |
for word_idx in word_ids:
|
81 |
+
if word_idx == -1 or word_idx is None or word_idx == previous_word_idx:
|
82 |
label_ids.append(-100)
|
83 |
else:
|
84 |
label_ids.append(label[word_idx])
|