Update app.py
Browse files
app.py
CHANGED
@@ -64,10 +64,11 @@ def generate(
|
|
64 |
{"input_ids": input_ids},
|
65 |
streamer=streamer,
|
66 |
max_new_tokens=max_new_tokens,
|
67 |
-
do_sample=
|
68 |
top_p=top_p,
|
69 |
top_k=top_k,
|
70 |
num_beams=1,
|
|
|
71 |
repetition_penalty=repetition_penalty,
|
72 |
eos_token_id=32021
|
73 |
)
|
@@ -96,7 +97,7 @@ chat_interface = gr.ChatInterface(
|
|
96 |
minimum=0.1,
|
97 |
maximum=4.0,
|
98 |
step=0.1,
|
99 |
-
value=0
|
100 |
),
|
101 |
gr.Slider(
|
102 |
label="Top-p (nucleus sampling)",
|
@@ -117,7 +118,7 @@ chat_interface = gr.ChatInterface(
|
|
117 |
minimum=1.0,
|
118 |
maximum=2.0,
|
119 |
step=0.05,
|
120 |
-
value=1
|
121 |
),
|
122 |
],
|
123 |
stop_btn=None,
|
|
|
64 |
{"input_ids": input_ids},
|
65 |
streamer=streamer,
|
66 |
max_new_tokens=max_new_tokens,
|
67 |
+
do_sample=True,
|
68 |
top_p=top_p,
|
69 |
top_k=top_k,
|
70 |
num_beams=1,
|
71 |
+
temperature=temperature,
|
72 |
repetition_penalty=repetition_penalty,
|
73 |
eos_token_id=32021
|
74 |
)
|
|
|
97 |
minimum=0.1,
|
98 |
maximum=4.0,
|
99 |
step=0.1,
|
100 |
+
value=0,
|
101 |
),
|
102 |
gr.Slider(
|
103 |
label="Top-p (nucleus sampling)",
|
|
|
118 |
minimum=1.0,
|
119 |
maximum=2.0,
|
120 |
step=0.05,
|
121 |
+
value=1,
|
122 |
),
|
123 |
],
|
124 |
stop_btn=None,
|