merve HF staff commited on
Commit
198feb9
1 Parent(s): 0598d8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -130,20 +130,21 @@ with gr.Blocks(theme="abidlabs/Lime") as demo:
130
  with gr.Column():
131
  with gr.Row():
132
  with gr.Column():
133
- max_new_tokens = gr.Slider(label = "Maximum length",
134
- minimum = 0,
135
- maximum = 512,
136
- value = 128)
137
- length_penalty = gr.Slider(label = "Length penalty",
138
- value=1.0)
139
- top_k = gr.Slider(label = "Top-k", value=10)
140
- top_p = gr.Slider(label = "Top-p", value=0.95)
141
- temp = gr.Slider(label = "Temperature", value=1.0, minimum=0.1, maximum=100.0)
142
- no_repeat_ngram_size =gr.Slider(label="No Repeat N-Gram Size", minimum=0,value=3,)
143
- repetition_penalty = gr.Slider(label = "Repetition Penalty", minimum=0.0, value=3.1, step=0.1)
144
- num_beams = gr.Slider(label = "Number of beams", minimum=1,
145
- maximum=10, value=3)
146
- do_sample = gr.Radio(choices = [True, False], value = True, label = "Sampling")
 
147
  with gr.Column():
148
  text_gen_input = gr.Textbox(label="Text Generation Input")
149
 
 
130
  with gr.Column():
131
  with gr.Row():
132
  with gr.Column():
133
+ with gr.Accordion("Advanced Generation Parameters"):
134
+ max_new_tokens = gr.Slider(label = "Maximum length",
135
+ minimum = 0,
136
+ maximum = 512,
137
+ value = 128)
138
+ length_penalty = gr.Slider(label = "Length penalty",
139
+ value=1.0)
140
+ top_k = gr.Slider(label = "Top-k", value=10)
141
+ top_p = gr.Slider(label = "Top-p", value=0.95)
142
+ temp = gr.Slider(label = "Temperature", value=1.0, minimum=0.1, maximum=100.0)
143
+ no_repeat_ngram_size =gr.Slider(label="No Repeat N-Gram Size", minimum=0,value=3,)
144
+ repetition_penalty = gr.Slider(label = "Repetition Penalty", minimum=0.0, value=3.1, step=0.1)
145
+ num_beams = gr.Slider(label = "Number of beams", minimum=1,
146
+ maximum=10, value=3)
147
+ do_sample = gr.Radio(choices = [True, False], value = True, label = "Sampling")
148
  with gr.Column():
149
  text_gen_input = gr.Textbox(label="Text Generation Input")
150