david-thrower commited on
Commit
000548f
·
verified ·
1 Parent(s): fb8294c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -27,6 +27,7 @@ model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype=torch.bfloat1
27
  # -------------------------------------------------
28
  # Helpers
29
  # -------------------------------------------------
 
30
  def build_messages(history, enable_thinking: bool):
31
  """Convert Gradio history to the chat template."""
32
  messages = []
@@ -90,7 +91,7 @@ with gr.Blocks(title="SmolLM3-3B Chat") as demo:
90
  msg.submit(
91
  user_fn, [msg, chatbot], [msg, chatbot], queue=False
92
  ).then(
93
- chat_fn, [chatbot, enable_think, temperature, top_p, top_k, repetition_penalty], chatbot
94
  )
95
  clear.click(lambda: None, None, chatbot, queue=False)
96
 
 
27
  # -------------------------------------------------
28
  # Helpers
29
  # -------------------------------------------------
30
+
31
  def build_messages(history, enable_thinking: bool):
32
  """Convert Gradio history to the chat template."""
33
  messages = []
 
91
  msg.submit(
92
  user_fn, [msg, chatbot], [msg, chatbot], queue=False
93
  ).then(
94
+ chat_fn, [chatbot, enable_think, temperature, top_p, top_k, repetition_penalty, max_new_tokens], chatbot
95
  )
96
  clear.click(lambda: None, None, chatbot, queue=False)
97