Skip to content

Commit 6aaac9c

Browse files
committed
Fixed pep8
1 parent 4915a77 commit 6aaac9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythainlp/transliterate/thaig2p_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ThaiG2P:
1616
Latin transliteration of Thai words, using International Phonetic Alphabet
1717
"""
1818

19-
def __init__(self, device: str="cpu"):
19+
def __init__(self, device: str = "cpu"):
2020
self.pipe = pipeline("text2text-generation", model="pythainlp/thaig2p-v2.0", device=device)
2121

2222
def g2p(self, text: str) -> str:
@@ -28,6 +28,6 @@ def g2p(self, text: str) -> str:
2828

2929
def transliterate(text: str, device="cpu") -> str:
3030
global _THAI_G2P
31-
if _THAI_G2P == None:
31+
if _THAI_G2P is None:
3232
_THAI_G2P = ThaiG2P(device=device)
3333
return _THAI_G2P.g2p(text)

0 commit comments

Comments
 (0)