nikravan commited on
Commit
21937b0
Β·
verified Β·
1 Parent(s): 5a07c64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -56,7 +56,7 @@ def predict(message, history, system_prompt, temperature, max_new_tokens, top_k,
56
  # Format history with a given chat template
57
 
58
  stop_tokens = [tokenizer.eos_token_id]
59
- pad_token_id=[tokenizer.eos_token_id] #151643
60
  instruction = system_prompt + "\n\n"
61
  for user, assistant in history:
62
  instruction += f"<|User|>{user}<|Assistant|>{assistant}\n"
@@ -119,8 +119,8 @@ gr.ChatInterface(
119
  additional_inputs_accordion=gr.Accordion(label="βš™οΈ Parameters", open=False),
120
  additional_inputs=[
121
  gr.Textbox("You are a useful assistant. first recognize user request and then reply carfuly and thinking", label="System prompt"),
122
- gr.Slider(0, 1, 0.3, label="Temperature"),
123
- gr.Slider(4000, 4096, 1024, label="Max new tokens"),
124
  gr.Slider(1, 80, 40, label="Top K sampling"),
125
  gr.Slider(0, 2, 1.1, label="Repetition penalty"),
126
  gr.Slider(0, 1, 0.95, label="Top P sampling"),
 
56
  # Format history with a given chat template
57
 
58
  stop_tokens = [tokenizer.eos_token_id]
59
+ tokenizer.pad_token_id=151643
60
  instruction = system_prompt + "\n\n"
61
  for user, assistant in history:
62
  instruction += f"<|User|>{user}<|Assistant|>{assistant}\n"
 
119
  additional_inputs_accordion=gr.Accordion(label="βš™οΈ Parameters", open=False),
120
  additional_inputs=[
121
  gr.Textbox("You are a useful assistant. first recognize user request and then reply carfuly and thinking", label="System prompt"),
122
+ gr.Slider(0, 1, 0.6, label="Temperature"),
123
+ gr.Slider(0, 32000, 10000, label="Max new tokens"),
124
  gr.Slider(1, 80, 40, label="Top K sampling"),
125
  gr.Slider(0, 2, 1.1, label="Repetition penalty"),
126
  gr.Slider(0, 1, 0.95, label="Top P sampling"),