Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,12 +64,11 @@ with gr.Blocks() as demo:
|
|
64 |
In order to reduce the response time on this hardware, `max_new_tokens` has been set to `21` in the text generation pipeline. With this default configuration, it takes approximately `60 seconds` for the response to start being generated, and streamed one word at a time. Use the slider below to increase or decrease the length of the generated text.
|
65 |
""")
|
66 |
|
67 |
-
|
|
|
68 |
chatbot = gr.ChatInterface(
|
69 |
fn=generate,
|
70 |
-
additional_inputs=[
|
71 |
-
gr.Slider(8, 128, value=21, label="Maximum new tokens", info="A larger `max_new_tokens` parameter value gives you longer text responses but at the cost of a slower response time.")
|
72 |
-
],
|
73 |
stop_btn=None,
|
74 |
examples=[["Who is Leonhard Euler?"]]
|
75 |
)
|
|
|
64 |
In order to reduce the response time on this hardware, `max_new_tokens` has been set to `21` in the text generation pipeline. With this default configuration, it takes approximately `60 seconds` for the response to start being generated, and streamed one word at a time. Use the slider below to increase or decrease the length of the generated text.
|
65 |
""")
|
66 |
|
67 |
+
tokens_slider = gr.Slider(8, 128, value=21, render=False, label="Maximum new tokens", info="A larger `max_new_tokens` parameter value gives you longer text responses but at the cost of a slower response time.")
|
68 |
+
|
69 |
chatbot = gr.ChatInterface(
|
70 |
fn=generate,
|
71 |
+
additional_inputs=[tokens_slider],
|
|
|
|
|
72 |
stop_btn=None,
|
73 |
examples=[["Who is Leonhard Euler?"]]
|
74 |
)
|