Spaces:
Build error
Build error
Update Main.py
Browse files
Main.py
CHANGED
|
@@ -134,7 +134,7 @@ class Main:
|
|
| 134 |
label_ids = np.argmax(logits, axis=2)
|
| 135 |
|
| 136 |
entities = []
|
| 137 |
-
for label_id, offset in zip(label_ids[0],
|
| 138 |
curr_id = self.idx2tag[label_id]
|
| 139 |
curr_start = offset[0]
|
| 140 |
curr_end = offset[1]
|
|
|
|
| 134 |
label_ids = np.argmax(logits, axis=2)
|
| 135 |
|
| 136 |
entities = []
|
| 137 |
+
for label_id, offset in zip(label_ids[0], data['offset_mapping']):
|
| 138 |
curr_id = self.idx2tag[label_id]
|
| 139 |
curr_start = offset[0]
|
| 140 |
curr_end = offset[1]
|