Skip to content

Commit a765bd3

Browse files
Copilotbact
andcommitted
Fix type hints in thai2fit module - all core stdlib modules 100% typed
Co-authored-by: bact <128572+bact@users.noreply.github.com>
1 parent 0fd08a5 commit a765bd3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pythainlp/generate/thai2fit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ def gen_sentence(
136136
if not start_seq:
137137
# Non-cryptographic use, pseudo-random generator is acceptable here
138138
start_seq = random.choice(list(thwiki_itos)) # noqa: S311
139-
list_word = learn.predict(
139+
predicted_text: str = learn.predict(
140140
start_seq, N, temperature=0.8, min_p=prob, sep="-*-"
141-
).split("-*-")
141+
)
142+
list_word = predicted_text.split("-*-")
142143

143144
if output_str:
144145
return "".join(list_word)

0 commit comments

Comments
 (0)