Spaces:
Runtime error
Runtime error
Reduce max new tokens range
Browse files
app.py
CHANGED
@@ -125,7 +125,7 @@ def generate(
|
|
125 |
top_p=top_p,
|
126 |
repetition_penalty=repetition_penalty,
|
127 |
do_sample=True,
|
128 |
-
truncate=
|
129 |
seed=42,
|
130 |
stop_sequences=["<|end|>"],
|
131 |
)
|
@@ -161,7 +161,6 @@ def generate(
|
|
161 |
|
162 |
examples = [
|
163 |
"How can I write a Python function to generate the nth Fibonacci number?",
|
164 |
-
"Draw me a map of the world using geopandas. Make it so that only Germany and Spain are colored red.",
|
165 |
"How do I get the current date using shell commands? Explain how it works.",
|
166 |
"What's the meaning of life?",
|
167 |
"Write a function in Python to reverse words in a given string.",
|
@@ -269,9 +268,9 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
|
|
269 |
)
|
270 |
max_new_tokens = gr.Slider(
|
271 |
label="Max new tokens",
|
272 |
-
value=
|
273 |
minimum=0,
|
274 |
-
maximum=
|
275 |
step=4,
|
276 |
interactive=True,
|
277 |
info="The maximum numbers of new tokens",
|
|
|
125 |
top_p=top_p,
|
126 |
repetition_penalty=repetition_penalty,
|
127 |
do_sample=True,
|
128 |
+
truncate=999,
|
129 |
seed=42,
|
130 |
stop_sequences=["<|end|>"],
|
131 |
)
|
|
|
161 |
|
162 |
examples = [
|
163 |
"How can I write a Python function to generate the nth Fibonacci number?",
|
|
|
164 |
"How do I get the current date using shell commands? Explain how it works.",
|
165 |
"What's the meaning of life?",
|
166 |
"Write a function in Python to reverse words in a given string.",
|
|
|
268 |
)
|
269 |
max_new_tokens = gr.Slider(
|
270 |
label="Max new tokens",
|
271 |
+
value=256,
|
272 |
minimum=0,
|
273 |
+
maximum=512,
|
274 |
step=4,
|
275 |
interactive=True,
|
276 |
info="The maximum numbers of new tokens",
|