Skip to content

Commit

Permalink
Correct lstrip regex (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed Feb 26, 2021
1 parent 63cdd5d commit d3b60aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aitextgen/aitextgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def generate(

# Handle stripping tokenization spaces w/ regex
if lstrip:
gen_texts = [re.sub(r"^\W+", "", text) for text in gen_texts]
gen_texts = [re.sub(r"^\s+", "", text) for text in gen_texts]

if not return_as_list:
if prompt:
Expand Down

0 comments on commit d3b60aa

Please sign in to comment.