Spaces:
Running
Running
nicholasKluge
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -101,8 +101,8 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
|
|
101 |
# Parameters to control the generation
|
102 |
with gr.Accordion(label="Parameters ⚙️", open=False):
|
103 |
safety = gr.Radio(["On", "Off"], label="Guard Rail 🛡️", value="On", info="Helps prevent the model from generating toxic/harmful content.")
|
104 |
-
top_k = gr.Slider(minimum=10, maximum=100, value=
|
105 |
-
top_p = gr.Slider(minimum=0.1, maximum=1.0, value=0
|
106 |
temperature = gr.Slider(minimum=0.1, maximum=2.0, value=0.1, step=0.1, interactive=True, label="Temperature", info="Controls the randomness of the generated tokens.")
|
107 |
repetition_penalty = gr.Slider(minimum=1, maximum=2, value=1.1, step=0.1, interactive=True, label="Repetition Penalty", info="Higher values help the model to avoid repetition in text generation.")
|
108 |
max_new_tokens = gr.Slider(minimum=10, maximum=500, value=200, step=10, interactive=True, label="Max Length", info="Controls the maximum number of new token (not considering the prompt) to generate.")
|
|
|
101 |
# Parameters to control the generation
|
102 |
with gr.Accordion(label="Parameters ⚙️", open=False):
|
103 |
safety = gr.Radio(["On", "Off"], label="Guard Rail 🛡️", value="On", info="Helps prevent the model from generating toxic/harmful content.")
|
104 |
+
top_k = gr.Slider(minimum=10, maximum=100, value=50, step=5, interactive=True, label="Top-k", info="Controls the number of highest probability tokens to consider for each step.")
|
105 |
+
top_p = gr.Slider(minimum=0.1, maximum=1.0, value=1.0, step=0.05, interactive=True, label="Top-p", info="Controls the cumulative probability of the generated tokens.")
|
106 |
temperature = gr.Slider(minimum=0.1, maximum=2.0, value=0.1, step=0.1, interactive=True, label="Temperature", info="Controls the randomness of the generated tokens.")
|
107 |
repetition_penalty = gr.Slider(minimum=1, maximum=2, value=1.1, step=0.1, interactive=True, label="Repetition Penalty", info="Higher values help the model to avoid repetition in text generation.")
|
108 |
max_new_tokens = gr.Slider(minimum=10, maximum=500, value=200, step=10, interactive=True, label="Max Length", info="Controls the maximum number of new token (not considering the prompt) to generate.")
|