Skip to content

Commit 1c0bc17

Browse files
committed
fix copies
1 parent 286f723 commit 1c0bc17

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/transformers/audio_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from typing import List, Optional, Tuple, Union
2323

2424
import numpy as np
25+
import torch
2526
import requests
2627

2728
from .utils import (

src/transformers/cache_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ def update(self, **kwargs):
321321
to_remove.append(key)
322322

323323
# Remove all the attributes that were updated, without modifying the input dict
324-
unused_kwargs = {
325-
key: value for key, value in kwargs.items() if key not in to_remove
326-
}
324+
unused_kwargs = {key: value for key, value in kwargs.items() if key not in to_remove}
327325
return unused_kwargs
328326

329327

src/transformers/convert_slow_tokenizer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,9 +1671,7 @@ def bytes_to_unicode():
16711671
tables between utf-8 bytes and unicode strings.
16721672
"""
16731673
bs = (
1674-
list(range(ord("!"), ord("~") + 1))
1675-
+ list(range(ord("¡"), ord("¬") + 1))
1676-
+ list(range(ord("®"), ord("ÿ") + 1))
1674+
list(range(ord("!"), ord("~") + 1)) + list(range(ord("¡"), ord("¬") + 1)) + list(range(ord("®"), ord("ÿ") + 1))
16771675
)
16781676
cs = bs[:]
16791677
n = 0

0 commit comments

Comments
 (0)