-
-
Save stephenroller/141a93de5e3f20dfe75ffc3b0a21cac8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# should work after `pip install parlai` | |
from parlai.core.agents import create_agent | |
agent = create_agent( | |
{ | |
'model_file': 'zoo:blender/blender_3B/model', # maps to the parlai downloads url | |
'datapath': '/tmp/blender', # where we save the downloaded model files | |
'interactive_mode': True, # don't load the optimizer, turn on beam search | |
} | |
) | |
agent.observe({'text': 'Hi, do you like ramen?', 'episode_done': False}) | |
print(agent.act()['text']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment