fix for stop sequence missing, added print for exception when loading GUI
This commit is contained in:
parent
0703cdf2eb
commit
433fa1e8b2
1 changed files with 8 additions and 6 deletions
|
@ -162,6 +162,7 @@ def generate(prompt,max_length=20, max_context_length=512,temperature=0.8,top_k=
|
||||||
inputs.rep_pen = rep_pen
|
inputs.rep_pen = rep_pen
|
||||||
inputs.rep_pen_range = rep_pen_range
|
inputs.rep_pen_range = rep_pen_range
|
||||||
inputs.seed = seed
|
inputs.seed = seed
|
||||||
|
if stop_sequence:
|
||||||
for n in range(0,stop_token_max):
|
for n in range(0,stop_token_max):
|
||||||
if n >= len(stop_sequence):
|
if n >= len(stop_sequence):
|
||||||
inputs.stop_sequence[n] = "".encode("UTF-8")
|
inputs.stop_sequence[n] = "".encode("UTF-8")
|
||||||
|
@ -503,6 +504,7 @@ def main(args):
|
||||||
show_gui()
|
show_gui()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print("File selection GUI unsupported. Please check command line: script.py --help")
|
print("File selection GUI unsupported. Please check command line: script.py --help")
|
||||||
|
print("Reason for no GUI: " + str(ex))
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue