Elijahbodden commited on
Commit
b81c4dd
·
verified ·
1 Parent(s): fe4eac6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -61,6 +61,7 @@ presets = {
61
 
62
 
63
  def respond(
 
64
  message,
65
  history: list[tuple[str, str]],
66
  temperature,
@@ -70,8 +71,7 @@ def respond(
70
  presence_penalty,
71
  lp_start,
72
  lp_decay,
73
- max_tokens,
74
- preset
75
  ):
76
 
77
  messages = presets[preset].copy()
@@ -110,11 +110,12 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
110
  """
111
  demo = gr.ChatInterface(
112
  respond,
113
- additional_inputs_accordion="The juicy stuff (settings)",
114
  css=".bubble-gap {gap: 6px !important}",
115
  description="The model may take a while if it hasn't run recently or a lot of people are using it",
116
  title="EliGPT v1.idon'tfuckingknow",
117
  additional_inputs=[
 
118
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature", info="How chaotic should the model be?"),
119
  gr.Slider(
120
  minimum=0.0,
@@ -165,7 +166,6 @@ demo = gr.ChatInterface(
165
  info='How fast should the stop likelihood increase?'
166
  ),
167
  gr.Slider(minimum=1, maximum=1024, value=256, step=1, label="Max new tokens", info="How many words can the model generate?"),
168
- gr.Radio(presets.keys(), label="Preset", info="Gaslight the model into acting a certain way", value="none")
169
  ],
170
  )
171
 
 
61
 
62
 
63
  def respond(
64
+ preset,
65
  message,
66
  history: list[tuple[str, str]],
67
  temperature,
 
71
  presence_penalty,
72
  lp_start,
73
  lp_decay,
74
+ max_tokens
 
75
  ):
76
 
77
  messages = presets[preset].copy()
 
110
  """
111
  demo = gr.ChatInterface(
112
  respond,
113
+ additional_inputs_accordion=gr.Accordion(label="Options", open=True),
114
  css=".bubble-gap {gap: 6px !important}",
115
  description="The model may take a while if it hasn't run recently or a lot of people are using it",
116
  title="EliGPT v1.idon'tfuckingknow",
117
  additional_inputs=[
118
+ gr.Radio(presets.keys(), label="Preset", info="Gaslight the model into acting a certain way", value="none")
119
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature", info="How chaotic should the model be?"),
120
  gr.Slider(
121
  minimum=0.0,
 
166
  info='How fast should the stop likelihood increase?'
167
  ),
168
  gr.Slider(minimum=1, maximum=1024, value=256, step=1, label="Max new tokens", info="How many words can the model generate?"),
 
169
  ],
170
  )
171