openai / generating-reviews-discovering-sentiment

Code for "Learning to Generate Reviews and Discovering Sentiment"
https://arxiv.org/abs/1704.01444
MIT License
1.51k stars 379 forks source link

Global variable 'nloaded' needs to be zero, everytime Model is initialized. #59

Open gitlost-murali opened 5 years ago

gitlost-murali commented 5 years ago

I tried using it in a Flask app. There's a global variable issue, so model doesn't work for 2nd time initialization. 'nloaded' is saturated to '13' in 'load_params'. So, the next time you call Model, 'nloaded' starts from 13, but not from 0.