Spaces:
Runtime error
Runtime error
Upload encoder_decoder_tokenizer.py
Browse files
encoder_decoder_tokenizer.py
CHANGED
|
@@ -6,7 +6,6 @@ Provides tokenizer implementations for encoder-decoder models.
|
|
| 6 |
import os
|
| 7 |
import numpy as np
|
| 8 |
import torch
|
| 9 |
-
import tensorflow as tf
|
| 10 |
from pathlib import Path
|
| 11 |
from overrides import overrides
|
| 12 |
from typing import Dict, Any, Tuple, Union, List, Optional, overload
|
|
@@ -324,7 +323,7 @@ class EncoderDecoderTokenizer(PreTrainedTokenizer):
|
|
| 324 |
|
| 325 |
def decode(
|
| 326 |
self,
|
| 327 |
-
token_ids: Union[int, List[int], "np.ndarray", "torch.Tensor"
|
| 328 |
skip_special_tokens: bool = False,
|
| 329 |
clean_up_tokenization_spaces: Optional[bool] = None,
|
| 330 |
**kwargs,
|
|
|
|
| 6 |
import os
|
| 7 |
import numpy as np
|
| 8 |
import torch
|
|
|
|
| 9 |
from pathlib import Path
|
| 10 |
from overrides import overrides
|
| 11 |
from typing import Dict, Any, Tuple, Union, List, Optional, overload
|
|
|
|
| 323 |
|
| 324 |
def decode(
|
| 325 |
self,
|
| 326 |
+
token_ids: Union[int, List[int], "np.ndarray", "torch.Tensor"],
|
| 327 |
skip_special_tokens: bool = False,
|
| 328 |
clean_up_tokenization_spaces: Optional[bool] = None,
|
| 329 |
**kwargs,
|