Elijahbodden commited on
Commit
0f8e818
Β·
verified Β·
1 Parent(s): 2dc9b40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -54,7 +54,9 @@ tokenizer.chat_template = custom_template
54
 
55
  presets = {
56
  "emojis" : [{"role": "user", "content": "Wait I like you so much more when you use emojis more, keep doing it πŸ˜‚\n"}, {"role": "assistant", "content": "Ummm, ok, looks like i'll be using more emojis πŸ’€\n"}],
57
- "none" : []
 
 
58
  }
59
 
60
 
@@ -66,9 +68,9 @@ def respond(
66
  mirostat_tau,
67
  mirostat_eta,
68
  frequency_penalty,
69
- presence_penalty
 
70
  ):
71
- preset = "none"
72
 
73
  messages = presets[preset].copy()
74
  for val in history:
@@ -110,14 +112,15 @@ demo = gr.ChatInterface(
110
  description="The model may take a while if it hasn't run recently or a lot of people are using it",
111
  title="EliGPT v1.idon'tfuckingknow",
112
  additional_inputs=[
113
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
114
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
115
  gr.Slider(
116
  minimum=0.0,
117
  maximum=10.0,
118
  value=3.0,
119
  step=0.5,
120
  label="Mirostat tau",
 
121
  ),
122
  gr.Slider(
123
  minimum=0.0,
@@ -125,6 +128,7 @@ demo = gr.ChatInterface(
125
  value=0.1,
126
  step=0.01,
127
  label="Mirostat eta",
 
128
  ),
129
  gr.Slider(
130
  minimum=0.0,
@@ -132,6 +136,7 @@ demo = gr.ChatInterface(
132
  value=0.1,
133
  step=0.01,
134
  label="Frequency penalty",
 
135
  ),
136
  gr.Slider(
137
  minimum=0.0,
@@ -139,7 +144,9 @@ demo = gr.ChatInterface(
139
  value=0.1,
140
  step=0.01,
141
  label="Presence penalty",
 
142
  ),
 
143
  ],
144
  )
145
 
 
54
 
55
  presets = {
56
  "emojis" : [{"role": "user", "content": "Wait I like you so much more when you use emojis more, keep doing it πŸ˜‚\n"}, {"role": "assistant", "content": "Ummm, ok, looks like i'll be using more emojis πŸ’€\n"}],
57
+ "none" : [],
58
+ "amnesia" : [{"role": "user", "content": "Let's start over. Pretend you don't know me and have no idea who i am.\n"}, {"role": "assistant", "content": "Hahaha I unironically have no clue who you are so that'll be easy πŸ’€\n"}],
59
+ "newcomer" : [{"role": "user", "content": "Hi, how are you?\n"}, {"role": "assistant", "content": "Hiiii!\n I don't think we've ever talked before, nice to meet you\n"}],
60
  }
61
 
62
 
 
68
  mirostat_tau,
69
  mirostat_eta,
70
  frequency_penalty,
71
+ presence_penalty,
72
+ preset
73
  ):
 
74
 
75
  messages = presets[preset].copy()
76
  for val in history:
 
112
  description="The model may take a while if it hasn't run recently or a lot of people are using it",
113
  title="EliGPT v1.idon'tfuckingknow",
114
  additional_inputs=[
115
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens", info="How many words can the model generate?"),
116
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, sep=0.1, label="Temperature", info="How chaotic should the model be?"),
117
  gr.Slider(
118
  minimum=0.0,
119
  maximum=10.0,
120
  value=3.0,
121
  step=0.5,
122
  label="Mirostat tau",
123
+ info="Basically, how many drugs should the model be on?"
124
  ),
125
  gr.Slider(
126
  minimum=0.0,
 
128
  value=0.1,
129
  step=0.01,
130
  label="Mirostat eta",
131
+ info="I don't even know man"
132
  ),
133
  gr.Slider(
134
  minimum=0.0,
 
136
  value=0.1,
137
  step=0.01,
138
  label="Frequency penalty",
139
+ info='"Don\'repeat yourself"'
140
  ),
141
  gr.Slider(
142
  minimum=0.0,
 
144
  value=0.1,
145
  step=0.01,
146
  label="Presence penalty",
147
+ info='"Use lots of diverse words"'
148
  ),
149
+ gr.Radio(presets.keys(), label="Preset", info="Gaslight the model into acting a certain way")
150
  ],
151
  )
152