mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-10 11:40:48 +08:00
update
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Dockerfile
|
||||
README.md
|
||||
*.pyc
|
||||
*.pyo
|
||||
__pycache__
|
||||
+12
@@ -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
|
||||
@@ -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
@@ -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)))
|
||||
@@ -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.
Reference in New Issue
Block a user