This commit is contained in:
Nick
2019-11-01 12:51:25 -06:00
parent c8a194589e
commit 33276167cb
9 changed files with 37 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
Dockerfile
README.md
*.pyc
*.pyo
__pycache__
+12
View File
@@ -0,0 +1,12 @@
FROM nvcr.io/nvidia/tensorflow:19.08-py3
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./
RUN pip install -r requirements.txt
RUN cd generator/ctrl
RUN ./install_ctrl_py3.sh
RUN ./download_model.sh
CMD exec guincorn --bind :%PORT --workers 1 --threads 8 app:app
+3
View File
@@ -25,15 +25,18 @@ def play_unconstrained():
#generator = WebGenerator(CRED_FILE)
prompt = get_story_start("apocalypse")
context = get_context("apocalypse")
story_manager = UnconstrainedStoryManager(generator)
story_manager.start_new_story(prompt, context=context)
print("\n")
print(context)
console_print(str(story_manager.story))
while (True):
action = input("> ")
if action != "":
action = action.strip()
action = action[0].lower() + action[1:]
if action[-1] == "." or action[-1] == "?" or action[-1] == "!":
+13
View File
@@ -0,0 +1,13 @@
import os
import flask
import Flask
app = Flask(__name__)
@app.route("/")
def hellp_world():
target = os.environ.get('TARGET', 'World')
return 'Hello {}!\n'.format(target)
if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
+4 -1
View File
@@ -3,6 +3,9 @@ exec -l $SHELL
gcloud init
URL="gs://sf-ctrl/seqlen512_v1.ckpt/"
URL="gs://aidungeon2model/finetuned_model.tar.gz"
gsutil -m cp -r "$URL" model
cd model
tar -xvzf finetuned_model.tar.gz
cd ..
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.