Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
c5a683f
1
Parent(s):
7033da3
indent errors (I think codex makes these worse
Browse files
app.py
CHANGED
|
@@ -179,11 +179,11 @@ def npc_generate(name,race,characterClass,pronoun):
|
|
| 179 |
print(f"GPTJ response without splits is: {output_tmp}")
|
| 180 |
if "\n\n" not in output_tmp:
|
| 181 |
if output_tmp.find('.') != -1:
|
| 182 |
-
|
| 183 |
-
|
| 184 |
else:
|
| 185 |
-
|
| 186 |
-
|
| 187 |
else:
|
| 188 |
longDescription = output_tmp.split("\n\n")[0] # +"."
|
| 189 |
longDescription = longDescription.replace('?','')
|
|
|
|
| 179 |
print(f"GPTJ response without splits is: {output_tmp}")
|
| 180 |
if "\n\n" not in output_tmp:
|
| 181 |
if output_tmp.find('.') != -1:
|
| 182 |
+
idx = output_tmp.find('.')
|
| 183 |
+
longDescription = output_tmp[:idx+1]
|
| 184 |
else:
|
| 185 |
+
idx = output_tmp.rfind('\n')
|
| 186 |
+
longDescription = output_tmp[:idx]
|
| 187 |
else:
|
| 188 |
longDescription = output_tmp.split("\n\n")[0] # +"."
|
| 189 |
longDescription = longDescription.replace('?','')
|