Skip to content

Commit

Permalink
v1.2.2: change byline, pass is_csv downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed May 5, 2018
1 parent 62837b6 commit bdf25f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
setup(
name='textgenrnn',
packages=['textgenrnn'], # this must be the same as the name above
version='1.2.1',
description='Pretrained character-based neural network for ' \
'easily generating text.',
version='1.2.2',
description='Easily train your own text-generating neural network' \
'of any size and complexity',
long_description=long_description,
long_description_content_type='text/markdown',
author='Max Woolf',
Expand Down
6 changes: 4 additions & 2 deletions textgenrnn/textgenrnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,16 @@ def reset(self):
self.__init__(name=self.config['name'])

def train_from_file(self, file_path, header=True, delim="\n",
new_model=False, context=None, **kwargs):
new_model=False, context=None,
is_csv=False, **kwargs):

context_labels = None
if context:
texts, context_labels = textgenrnn_texts_from_file_context(
file_path)
else:
texts = textgenrnn_texts_from_file(file_path, header, delim)
texts = textgenrnn_texts_from_file(file_path, header,
delim, is_csv)

print("{:,} texts collected.".format(len(texts)))
if new_model:
Expand Down

0 comments on commit bdf25f2

Please sign in to comment.