Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
•
b9bcf75
1
Parent(s):
e4d28ce
better prompt
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def fallbackResponse():
|
|
24 |
def continue_story(prompt,story):
|
25 |
print("about to die",basePrompt,story,prompt)
|
26 |
print("huh?",story)
|
27 |
-
p=basePrompt+story+"player:"+str(prompt)
|
28 |
|
29 |
print("got prompt:\n\n",p)
|
30 |
|
@@ -60,10 +60,12 @@ def continue_story(prompt,story):
|
|
60 |
if "\n" in output_tmp:
|
61 |
idx = output_tmp.find('\n')
|
62 |
output_tmp = output_tmp[:idx]
|
|
|
63 |
#check if response starts with "computer:", if not use fallback
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
67 |
print("which was trimmed to",output_tmp)
|
68 |
|
69 |
#truncate story to last 6 lines
|
|
|
24 |
def continue_story(prompt,story):
|
25 |
print("about to die",basePrompt,story,prompt)
|
26 |
print("huh?",story)
|
27 |
+
p=basePrompt+story+"player:"+str(prompt)+"\ncomputer:"
|
28 |
|
29 |
print("got prompt:\n\n",p)
|
30 |
|
|
|
60 |
if "\n" in output_tmp:
|
61 |
idx = output_tmp.find('\n')
|
62 |
output_tmp = output_tmp[:idx]
|
63 |
+
|
64 |
#check if response starts with "computer:", if not use fallback
|
65 |
+
#think I was just being dumb, should have included 'computer:' in the prompt
|
66 |
+
#if not output_tmp.startswith("computer:"):
|
67 |
+
# output_tmp = "computer:"+fallbackResponse()
|
68 |
+
|
69 |
print("which was trimmed to",output_tmp)
|
70 |
|
71 |
#truncate story to last 6 lines
|