pabloce commited on
Commit
89f289d
·
verified ·
1 Parent(s): 91e5cf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -160,13 +160,13 @@ def write_message_to_user():
160
  def respond(
161
  message,
162
  history: list[tuple[str, str]],
 
163
  system_message,
164
  max_tokens,
165
  temperature,
166
  top_p,
167
  top_k,
168
  repeat_penalty,
169
- model,
170
  ):
171
  chat_template = get_messages_formatter_type(model)
172
  model_selected = model
@@ -236,6 +236,13 @@ def respond(
236
  demo = gr.ChatInterface(
237
  respond,
238
  additional_inputs=[
 
 
 
 
 
 
 
239
  gr.Textbox(value="You are a helpful assistant. Use additional available information you have access to when giving a response. Always give detailed and long responses. Format your response, well structured in markdown format.", label="System message"),
240
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
241
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
@@ -260,13 +267,6 @@ demo = gr.ChatInterface(
260
  step=0.1,
261
  label="Repetition penalty",
262
  ),
263
- gr.Dropdown([
264
- 'Mistral-7B-Instruct-v0.3-Q6_K.gguf',
265
- 'Meta-Llama-3-8B-Instruct-Q6_K.gguf'
266
- ],
267
- value="Mistral-7B-Instruct-v0.3-Q6_K.gguf",
268
- label="Model"
269
- ),
270
  ],
271
  theme=gr.themes.Soft(
272
  primary_hue="violet",
 
160
  def respond(
161
  message,
162
  history: list[tuple[str, str]],
163
+ model,
164
  system_message,
165
  max_tokens,
166
  temperature,
167
  top_p,
168
  top_k,
169
  repeat_penalty,
 
170
  ):
171
  chat_template = get_messages_formatter_type(model)
172
  model_selected = model
 
236
  demo = gr.ChatInterface(
237
  respond,
238
  additional_inputs=[
239
+ gr.Dropdown([
240
+ 'Mistral-7B-Instruct-v0.3-Q6_K.gguf',
241
+ 'Meta-Llama-3-8B-Instruct-Q6_K.gguf'
242
+ ],
243
+ value="Mistral-7B-Instruct-v0.3-Q6_K.gguf",
244
+ label="Model"
245
+ ),
246
  gr.Textbox(value="You are a helpful assistant. Use additional available information you have access to when giving a response. Always give detailed and long responses. Format your response, well structured in markdown format.", label="System message"),
247
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
248
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
 
267
  step=0.1,
268
  label="Repetition penalty",
269
  ),
 
 
 
 
 
 
 
270
  ],
271
  theme=gr.themes.Soft(
272
  primary_hue="violet",