Skip to content

Commit

Permalink
Merge pull request #1573 from ReactionMechanismGenerator/quotegen
Browse files Browse the repository at this point in the history
RMG-NLP
  • Loading branch information
mliu49 committed Apr 8, 2019
2 parents 45b8a13 + 1e17830 commit a5ab75c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions environment_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ dependencies:
- mpmath
- dde
- pyyaml
- textgenrnn
1 change: 1 addition & 0 deletions environment_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ dependencies:
- mpmath
- dde
- pyyaml
- textgenrnn
1 change: 1 addition & 0 deletions environment_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ dependencies:
- mpmath
- dde
- pyyaml
- textgenrnn
15 changes: 15 additions & 0 deletions rmgpy/rmg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,21 @@ def finish(self):
"""
Complete the model generation.
"""
# Print neural network-generated quote
import datetime
import textwrap
try:
from textgenrnn.quotes import get_quote
except ImportError:
pass
else:
quote = '"' + get_quote() + '"'
logging.info('')
logging.info(textwrap.fill(quote, subsequent_indent=' '))
logging.info(' ---Quote-generating neural network, {}'.format(
datetime.datetime.now().strftime("%B %Y")
))

# Log end timestamp
logging.info('')
logging.info('RMG execution terminated at ' + time.asctime())
Expand Down

0 comments on commit a5ab75c

Please sign in to comment.