Skip to content

Commit

Permalink
Merge pull request #128 from Fliens/added-story_separator
Browse files Browse the repository at this point in the history
added .strip() to remove empty epoch
  • Loading branch information
lucidrains authored Apr 7, 2021
2 parents 53bd238 + a369639 commit 4206916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deep_daze/deep_daze.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def __init__(
print('Exiting because the text only consists of the separator! Needs words or phrases that are separated by the separator.')
exit()
#adds a space to each separator and removes double spaces that might be generated
text = text.replace(self.separator,self.separator+' ').replace(' ',' ')
text = text.replace(self.separator,self.separator+' ').replace(' ',' ').strip()
self.all_words = text.split(" ") if text is not None else None
self.num_start_words = story_start_words
self.words_per_epoch = story_words_per_epoch
Expand Down

0 comments on commit 4206916

Please sign in to comment.