Spaces:
Running
Running
⚡️ pass thru max length
Browse filesSigned-off-by: peter szemraj <[email protected]>
app.py
CHANGED
@@ -108,7 +108,7 @@ def get_parser():
|
|
108 |
"--max_length",
|
109 |
required=False,
|
110 |
type=int,
|
111 |
-
default=
|
112 |
help="default max length of the generated text",
|
113 |
)
|
114 |
parser.add_argument(
|
@@ -154,6 +154,7 @@ if __name__ == "__main__":
|
|
154 |
logging.info(f"received args:\t{args}")
|
155 |
model_tag = args.model
|
156 |
verbose = args.verbose
|
|
|
157 |
top_k = args.top_k
|
158 |
alpha = args.penalty_alpha
|
159 |
|
@@ -194,7 +195,7 @@ if __name__ == "__main__":
|
|
194 |
)
|
195 |
num_gen_tokens = gr.Slider(
|
196 |
label="Generation Tokens",
|
197 |
-
value=
|
198 |
maximum=96,
|
199 |
minimum=16,
|
200 |
step=8,
|
|
|
108 |
"--max_length",
|
109 |
required=False,
|
110 |
type=int,
|
111 |
+
default=32,
|
112 |
help="default max length of the generated text",
|
113 |
)
|
114 |
parser.add_argument(
|
|
|
154 |
logging.info(f"received args:\t{args}")
|
155 |
model_tag = args.model
|
156 |
verbose = args.verbose
|
157 |
+
max_length = args.max_length
|
158 |
top_k = args.top_k
|
159 |
alpha = args.penalty_alpha
|
160 |
|
|
|
195 |
)
|
196 |
num_gen_tokens = gr.Slider(
|
197 |
label="Generation Tokens",
|
198 |
+
value=max_length,
|
199 |
maximum=96,
|
200 |
minimum=16,
|
201 |
step=8,
|