home
·
contact
·
privacy
projects
/
stable_plom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e1b56a
)
Minor parsing corrections.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 26 Aug 2024 04:47:53 +0000
(06:47 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 26 Aug 2024 04:47:53 +0000
(06:47 +0200)
stable/gen_params.py
patch
|
blob
|
history
diff --git
a/stable/gen_params.py
b/stable/gen_params.py
index 160735c79a1e67b2551bb19e85c0fe5436fa87d4..a1e72e86e8e2289590b994b4360a93c570aea3c3 100644
(file)
--- a/
stable/gen_params.py
+++ b/
stable/gen_params.py
@@
-27,10
+27,13
@@
class GenParams:
d = {}
first_split = string.split('; PROMPT: ', maxsplit=1)
if 2 == len(first_split):
- d['prompt'] = first_split[1]
+ d['prompt'] = first_split[1].strip()
+ if not d['prompt']:
+ d['prompt'] = ' '
for section in first_split[0].split('; '):
key, val = section.split(': ', maxsplit=1)
- key = key.lower()
+ key = key.lower().strip()
+ val = val.strip()
if key.upper() in GEN_PARAMS_INT:
val = int(val)
elif key.upper() in GEN_PARAMS_FLOAT: