Skip to content

Commit

Permalink
add UI for token unbanning
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed May 1, 2023
1 parent 3de34ee commit 4d38795
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def generate(prompt,max_length=20, max_context_length=512,temperature=0.8,top_k=
maxlen = 128
modelbusy = False
defaultport = 5001
KcppVersion = "1.16"
KcppVersion = "1.17"

class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
sys_version = ""
Expand Down Expand Up @@ -432,8 +432,10 @@ def guilaunch():
stream = tk.IntVar()
smartcontext = tk.IntVar()
launchbrowser = tk.IntVar(value=1)
unbantokens = tk.IntVar()
tk.Checkbutton(root, text='Streaming Mode',variable=stream, onvalue=1, offvalue=0).pack()
tk.Checkbutton(root, text='Use SmartContext',variable=smartcontext, onvalue=1, offvalue=0).pack()
tk.Checkbutton(root, text='Unban Tokens',variable=unbantokens, onvalue=1, offvalue=0).pack()
tk.Checkbutton(root, text='Launch Browser',variable=launchbrowser, onvalue=1, offvalue=0).pack()

# Create button, it will change label text
Expand All @@ -452,6 +454,7 @@ def guilaunch():
args.stream = (stream.get()==1)
args.smartcontext = (smartcontext.get()==1)
args.launch = (launchbrowser.get()==1)
args.unbantokens = (unbantokens.get()==1)
selchoice = runchoice.get()

if selchoice==opts[1]:
Expand Down

0 comments on commit 4d38795

Please sign in to comment.