Generated text will appear here! + Use the form to configure GPT-2 and press Generate Text + to get your Reddit submission title! +
+diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..23adf76 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.7.3-slim-stretch + +RUN apt-get -y update && apt-get -y install gcc + +WORKDIR / +COPY checkpoint /checkpoint + +# Make changes to the requirements/app here. +# This Dockerfile order allows Docker to cache the checkpoint layer +# and improve build times if making changes. +RUN pip3 --no-cache-dir install tensorflow gpt-2-simple starlette uvicorn ujson +COPY app.py / + +# Clean up APT when done. +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +ENTRYPOINT ["python3", "-X", "utf8", "app.py"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4f47092 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Max Woolf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9e02f0 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# mtg-gpt-2-cloud-run + +## Maintainer/Creator + +Max Woolf ([@minimaxir](https://minimaxir.com)) + +*Max's open-source projects are supported by his [Patreon](https://www.patreon.com/minimaxir). If you found this project helpful, any monetary contributions to the Patreon are appreciated and will be put to good creative use.* + +## License + +MIT + +## Disclaimer + +This repo has no affiliation or relationship with OpenAI. \ No newline at end of file diff --git a/api_ui.html b/api_ui.html new file mode 100644 index 0000000..7061ed2 --- /dev/null +++ b/api_ui.html @@ -0,0 +1,287 @@ + + + + + + +
+ + +Generated text will appear here! + Use the form to configure GPT-2 and press Generate Text + to get your Reddit submission title! +
+