Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -94,19 +94,19 @@ if __name__ == "__main__":
|
|
94 |
# beam search
|
95 |
gr.Markdown(
|
96 |
"""
|
97 |
-
|
98 |
""")
|
99 |
num_beams = gr.Slider(maximum=4, value=1, minimum=1, step=1, label='Number of Beams')
|
100 |
-
length_penalty = gr.Slider(maximum=1, value=
|
101 |
no_repeat_ngram_size = gr.Slider(maximum=5, value=3, minimum=1, step=1, label='No Repeat Ngram Size')
|
102 |
with gr.Column():
|
103 |
# base search
|
104 |
gr.Markdown(
|
105 |
"""
|
106 |
-
|
107 |
""")
|
108 |
temperature = gr.Slider(maximum=1, value=1, minimum=0, label='Temperature')
|
109 |
-
topk = gr.Slider(maximum=
|
110 |
topp = gr.Slider(maximum=1, value=0, minimum=0, label='Top P')
|
111 |
|
112 |
inputs = [model_input, seed, out_seq_length, min_gen_length, sampling_strategy, num_beams, length_penalty, no_repeat_ngram_size, temperature, topk, topp]
|
|
|
94 |
# beam search
|
95 |
gr.Markdown(
|
96 |
"""
|
97 |
+
BeamSearchStrategy
|
98 |
""")
|
99 |
num_beams = gr.Slider(maximum=4, value=1, minimum=1, step=1, label='Number of Beams')
|
100 |
+
length_penalty = gr.Slider(maximum=1, value=1, minimum=0, label='Length Penalty')
|
101 |
no_repeat_ngram_size = gr.Slider(maximum=5, value=3, minimum=1, step=1, label='No Repeat Ngram Size')
|
102 |
with gr.Column():
|
103 |
# base search
|
104 |
gr.Markdown(
|
105 |
"""
|
106 |
+
BaseStrategy
|
107 |
""")
|
108 |
temperature = gr.Slider(maximum=1, value=1, minimum=0, label='Temperature')
|
109 |
+
topk = gr.Slider(maximum=40, value=1, minimum=0, step=1, label='Top K')
|
110 |
topp = gr.Slider(maximum=1, value=0, minimum=0, label='Top P')
|
111 |
|
112 |
inputs = [model_input, seed, out_seq_length, min_gen_length, sampling_strategy, num_beams, length_penalty, no_repeat_ngram_size, temperature, topk, topp]
|