Spaces:
Sleeping
Sleeping
Peter
commited on
Commit
•
504e8b4
1
Parent(s):
4fc786e
decrease default params
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ def load_examples(examples_dir="examples"):
|
|
118 |
for example in examples:
|
119 |
with open(example, "r") as f:
|
120 |
text = f.read()
|
121 |
-
text_examples.append([text,
|
122 |
|
123 |
return text_examples
|
124 |
|
@@ -136,10 +136,10 @@ if __name__ == "__main__":
|
|
136 |
inputs=[
|
137 |
gr.inputs.Textbox(lines=10, label="input text"),
|
138 |
gr.inputs.Slider(
|
139 |
-
minimum=1, maximum=
|
140 |
),
|
141 |
gr.inputs.Slider(
|
142 |
-
minimum=512, maximum=
|
143 |
),
|
144 |
gr.inputs.Slider(
|
145 |
minimum=0.5, maximum=1.1, label="length_penalty", default=0.7, step=0.05
|
|
|
118 |
for example in examples:
|
119 |
with open(example, "r") as f:
|
120 |
text = f.read()
|
121 |
+
text_examples.append([text, 2, 1024, 0.7, 3.5, 3])
|
122 |
|
123 |
return text_examples
|
124 |
|
|
|
136 |
inputs=[
|
137 |
gr.inputs.Textbox(lines=10, label="input text"),
|
138 |
gr.inputs.Slider(
|
139 |
+
minimum=1, maximum=6, label="num_beams", default=2, step=1
|
140 |
),
|
141 |
gr.inputs.Slider(
|
142 |
+
minimum=512, maximum=2048, label="token_batch_length", default=1024, step=512,
|
143 |
),
|
144 |
gr.inputs.Slider(
|
145 |
minimum=0.5, maximum=1.1, label="length_penalty", default=0.7, step=0.05
|