Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
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.
|
123 |
-
gr.Slider(
|
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"),
|