mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
+2
-3
@@ -1,8 +1,7 @@
|
||||
FROM nvcr.io/nvidia/tensorflow:19.08-py3
|
||||
|
||||
ENV APP_HOME /app
|
||||
WORKDIR $APP_HOME
|
||||
COPY . ./
|
||||
RUN git clone http://github.com/nickwalton/AIDungeon.git
|
||||
RUN cd AIDungeon
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
RUN cd generator/ctrl
|
||||
|
||||
+1
-1
@@ -25,7 +25,6 @@ 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)
|
||||
|
||||
@@ -37,6 +36,7 @@ def play_unconstrained():
|
||||
|
||||
if action != "":
|
||||
action = action.strip()
|
||||
|
||||
action = action[0].lower() + action[1:]
|
||||
|
||||
if action[-1] == "." or action[-1] == "?" or action[-1] == "!":
|
||||
|
||||
@@ -221,6 +221,11 @@ class CTRLGenerator():
|
||||
"http://www.@@", "edit@@", "*@@", "Writing", "Text@@", "\\@@", "<br>@@", "<div", "|@@", '...',
|
||||
'..','…', 'https://@@', '...@@']
|
||||
|
||||
|
||||
encourage_tokens = ["zombie", "radiation", "fallout", "undead", "corpse", "vampire", "virus", "plague"]
|
||||
for encourage_token in encourage_tokens:
|
||||
prompt_logits[_token][self.word2idx[encourage_token]] *= 1.2
|
||||
|
||||
for forbidden_token in forbidden_tokens:
|
||||
prompt_logits[_token][self.word2idx[forbidden_token]] = -1e8
|
||||
|
||||
|
||||
@@ -119,9 +119,20 @@ first_to_second_mappings = [
|
||||
("Im", "you're"),
|
||||
("Ive", "you've"),
|
||||
("I am", "you are"),
|
||||
<<<<<<< HEAD
|
||||
("I", "you"),
|
||||
("i", "you"),
|
||||
("I've", "you've"),
|
||||
=======
|
||||
("was I", "were you"),
|
||||
("am I", "are you"),
|
||||
("wasn't I", "weren't you"),
|
||||
("I", "you"),
|
||||
("I'd", "you'd"),
|
||||
("i", "you"),
|
||||
("I've", "you've"),
|
||||
("I was", "you were"),
|
||||
>>>>>>> 93133cfce7068261e646d47faa0c84119108be4b
|
||||
("my", "your"),
|
||||
("we","you"),
|
||||
("we're", "you're"),
|
||||
@@ -137,6 +148,11 @@ second_to_first_mappings = [
|
||||
("you're", "I'm"),
|
||||
("your", "my"),
|
||||
("you are", "I am"),
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
("you were", "I was"),
|
||||
("are you", "am I"),
|
||||
>>>>>>> 93133cfce7068261e646d47faa0c84119108be4b
|
||||
("you", "I"),
|
||||
("you", "me"),
|
||||
("you'll", "I'll"),
|
||||
|
||||
Reference in New Issue
Block a user