GreatCaptainNemo commited on
Commit
27a367c
1 Parent(s): f6842b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -37
app.py CHANGED
@@ -45,7 +45,7 @@ if torch.cuda.is_available():
45
  def generate(
46
  message: str,
47
  chat_history: list[tuple[str, str]],
48
- system_prompt: str,
49
  max_new_tokens: int = 1024,
50
  temperature: float = 0.95,
51
  top_p: float = 0.7,
@@ -89,42 +89,42 @@ def generate(
89
  chat_interface = gr.ChatInterface(
90
  fn=generate,
91
  additional_inputs=[
92
- gr.Textbox(label="System prompt", lines=6),
93
- gr.Slider(
94
- label="Max new tokens",
95
- minimum=1,
96
- maximum=MAX_MAX_NEW_TOKENS,
97
- step=1,
98
- value=DEFAULT_MAX_NEW_TOKENS,
99
- ),
100
- gr.Slider(
101
- label="Temperature",
102
- minimum=0.1,
103
- maximum=4.0,
104
- step=0.1,
105
- value=0.6,
106
- ),
107
- gr.Slider(
108
- label="Top-p (nucleus sampling)",
109
- minimum=0.05,
110
- maximum=1.0,
111
- step=0.05,
112
- value=0.9,
113
- ),
114
- gr.Slider(
115
- label="Top-k",
116
- minimum=1,
117
- maximum=1000,
118
- step=1,
119
- value=50,
120
- ),
121
- gr.Slider(
122
- label="Repetition penalty",
123
- minimum=1.0,
124
- maximum=2.0,
125
- step=0.05,
126
- value=1.2,
127
- ),
128
  ],
129
  stop_btn=None,
130
  examples=[
 
45
  def generate(
46
  message: str,
47
  chat_history: list[tuple[str, str]],
48
+ system_prompt: str='You are a person with distinctive personality traits. Your answers should reflect your personality either implicitly or explicitly.',
49
  max_new_tokens: int = 1024,
50
  temperature: float = 0.95,
51
  top_p: float = 0.7,
 
89
  chat_interface = gr.ChatInterface(
90
  fn=generate,
91
  additional_inputs=[
92
+ # gr.Textbox(label="System prompt", lines=6),
93
+ # gr.Slider(
94
+ # label="Max new tokens",
95
+ # minimum=1,
96
+ # maximum=MAX_MAX_NEW_TOKENS,
97
+ # step=1,
98
+ # value=DEFAULT_MAX_NEW_TOKENS,
99
+ # ),
100
+ # gr.Slider(
101
+ # label="Temperature",
102
+ # minimum=0.1,
103
+ # maximum=4.0,
104
+ # step=0.1,
105
+ # value=0.6,
106
+ # ),
107
+ # gr.Slider(
108
+ # label="Top-p (nucleus sampling)",
109
+ # minimum=0.05,
110
+ # maximum=1.0,
111
+ # step=0.05,
112
+ # value=0.9,
113
+ # ),
114
+ # gr.Slider(
115
+ # label="Top-k",
116
+ # minimum=1,
117
+ # maximum=1000,
118
+ # step=1,
119
+ # value=50,
120
+ # ),
121
+ # gr.Slider(
122
+ # label="Repetition penalty",
123
+ # minimum=1.0,
124
+ # maximum=2.0,
125
+ # step=0.05,
126
+ # value=1.2,
127
+ # ),
128
  ],
129
  stop_btn=None,
130
  examples=[