OpenYourMind is a Word plugin that can generate paragraphs of text based on a few words or sentences you write. It is intended to help stimulate your creativity by generating content that is both coherent and context-aware to what you write. Microsoft recently went into a $1B deal with OpenAI, and we're using OpenAI's GPT-2 language model to do this.
More about GPT-2 and some of the content it generates from here (it's both scary and fascinating): https://openai.com/blog/better-language-models/.
Our hackathon project is detailed here: https://garagehackbox.azurewebsites.net/hackathons/1857/projects/82703.
- Python 3.6 or above
- Create virtual environment (best practice)
git clone https://github.com/openai/gpt-2.git
cd gpt-2/
python3 -m venv ~/venv-gpt-2
. ~/venv-gpt-2/bin/activate
- Install Tensorflow and additional requirements
pip3 install tensorflow==1.12
pip3 install -r requirements.txt
python3 download_model.py 117M
python3 download_model.py 345M
- Navigate to
oym_plugin/
folder, and runnpm install
to install the tools and libraries listed in the package.json file. - Install self-signed ceritificate found in the
oym_plugin/certs
folder. Instructions can be found here. - Run
npm run build
to transpile your ES6 source code to an earlier version of JavaScript that is supported by all the hosts where Office Add-ins can run. - Run the command
npm start
to start a web server running on localhost. - In a separate Terminal, navigate to root of this project, and run
python3 app.py
to start the Flask server. - Create a new Word document online or locally, and sideload the Word plugin by using one of the methods offered in the tutorial.
- Write some sentences on the document, and click on the 'Ignite My Creativity' button on the plugin to generate text using GPT-2.