DanTm99 / gpt2-article-generator

An application that uses GPT-2 to generate news articles from user given prompts
55 stars 26 forks source link

SyntaxError: invalid syntax #5

Open Duartemartins opened 3 years ago

Duartemartins commented 3 years ago
File "ArticleGenerator.py", line 11
    raise argparse.ArgumentTypeError(f'{value} is not a positive int.')
                                                                     ^
SyntaxError: invalid syntax

I get this error when running python ArticleGenerator.py -f input.txt -o sample.txt -n 3

Any idea why it could be doing this?

When running python3 ArticleGenerator.py -f input.txt -o sample.txt -n 3

I get RuntimeError: dictionary changed size during iteration

DanTm99 commented 3 years ago

The error when running python ArticleGenerator.py -f input.txt -o sample.txt -n 3 is due to the code requiring Python 3.

For the error when running python3 ArticleGenerator.py -f input.txt -o sample.txt -n 3, what are the contents of your input.txt and sample.txt?

Duartemartins commented 3 years ago

Thanks for getting back. Sample.txt doesn't exist, input.txt has one paragraph of text.