DviantDses commited on
Commit
2d241c5
·
verified ·
1 Parent(s): 73bf089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -9,6 +9,9 @@ Your responses are very short and direct
9
 
10
  Your responses must be worded as if they were the statistics in an RPG game, with item and character descriptions as if they were part of the game
11
  """
 
 
 
12
 
13
 
14
  def respond(
@@ -53,16 +56,22 @@ chatbot = gr.ChatInterface(
53
  type="messages",
54
  additional_inputs=[
55
  gr.Textbox(value=SYSTEM_PROMPT, label="System message"),
56
- gr.Slider(minimum=1, maximum=2048, value=300, step=1, label="Max new tokens"),
57
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
58
  gr.Slider(
59
  minimum=0.1,
60
  maximum=1.0,
61
- value=0.95,
62
  step=0.05,
63
  label="Top-p (nucleus sampling)",
64
  ),
65
  ],
 
 
 
 
 
 
66
  )
67
 
68
  with gr.Blocks() as demo:
 
9
 
10
  Your responses must be worded as if they were the statistics in an RPG game, with item and character descriptions as if they were part of the game
11
  """
12
+ DEFAULT_TOKENS = 300
13
+ DEFAULT_TEMPERATURE = 0.7
14
+ DEFAULT_TOP_P = 0.95
15
 
16
 
17
  def respond(
 
56
  type="messages",
57
  additional_inputs=[
58
  gr.Textbox(value=SYSTEM_PROMPT, label="System message"),
59
+ gr.Slider(minimum=1, maximum=2048, value=DEFAULT_TOKENS, step=1, label="Max new tokens"),
60
+ gr.Slider(minimum=0.1, maximum=4.0, value=DEFAULT_TEMPERATURE, step=0.1, label="Temperature"),
61
  gr.Slider(
62
  minimum=0.1,
63
  maximum=1.0,
64
+ value=DEFAULT_TOP_P,
65
  step=0.05,
66
  label="Top-p (nucleus sampling)",
67
  ),
68
  ],
69
+ examples=[
70
+ [
71
+ "Provide the stats of the female workers in the local town's brothel, these stats refer to the number of sexual acts (vaginal, anal, etc) executed by each person and their profficiency at it",
72
+ SYSTEM_PROMPT, DEFAULT_TOKENS, DEFAULT_TEMPERATURE, DEFAULT_TOP_P,
73
+ ],
74
+ ],
75
  )
76
 
77
  with gr.Blocks() as demo: