pabloce commited on
Commit
c82d589
·
verified ·
1 Parent(s): c81bf86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -50,13 +50,13 @@ def get_messages_formatter_type(model_name):
50
  def respond(
51
  message,
52
  history: list[tuple[str, str]],
 
53
  system_message,
54
  max_tokens,
55
  temperature,
56
  top_p,
57
  top_k,
58
  repeat_penalty,
59
- model,
60
  ):
61
  chat_template = get_messages_formatter_type(model)
62
 
@@ -151,6 +151,13 @@ PLACEHOLDER = """
151
  demo = gr.ChatInterface(
152
  respond,
153
  additional_inputs=[
 
 
 
 
 
 
 
154
  gr.Textbox(value="You are a helpful assistant.", label="System message"),
155
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
156
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
@@ -175,13 +182,6 @@ demo = gr.ChatInterface(
175
  step=0.1,
176
  label="Repetition penalty",
177
  ),
178
- gr.Dropdown([
179
- 'Meta-Llama-3-70B-Instruct-Q3_K_M.gguf',
180
- 'Mistral-7B-Instruct-v0.3-f32.gguf'
181
- ],
182
- value="Meta-Llama-3-70B-Instruct-Q3_K_M.gguf",
183
- label="Model"
184
- ),
185
  ],
186
  theme=gr.themes.Soft(primary_hue="violet", secondary_hue="violet", neutral_hue="gray",font=[gr.themes.GoogleFont("Exo"), "ui-sans-serif", "system-ui", "sans-serif"]).set(
187
  body_background_fill_dark="#16141c",
 
50
  def respond(
51
  message,
52
  history: list[tuple[str, str]],
53
+ model,
54
  system_message,
55
  max_tokens,
56
  temperature,
57
  top_p,
58
  top_k,
59
  repeat_penalty,
 
60
  ):
61
  chat_template = get_messages_formatter_type(model)
62
 
 
151
  demo = gr.ChatInterface(
152
  respond,
153
  additional_inputs=[
154
+ gr.Dropdown([
155
+ 'Meta-Llama-3-70B-Instruct-Q3_K_M.gguf',
156
+ 'Mistral-7B-Instruct-v0.3-f32.gguf'
157
+ ],
158
+ value="Meta-Llama-3-70B-Instruct-Q3_K_M.gguf",
159
+ label="Model"
160
+ ),
161
  gr.Textbox(value="You are a helpful assistant.", label="System message"),
162
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
163
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
 
182
  step=0.1,
183
  label="Repetition penalty",
184
  ),
 
 
 
 
 
 
 
185
  ],
186
  theme=gr.themes.Soft(primary_hue="violet", secondary_hue="violet", neutral_hue="gray",font=[gr.themes.GoogleFont("Exo"), "ui-sans-serif", "system-ui", "sans-serif"]).set(
187
  body_background_fill_dark="#16141c",