Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def proc_submission(
|
|
24 |
num_beams,
|
25 |
token_batch_length,
|
26 |
length_penalty,
|
27 |
-
max_input_length: int =
|
28 |
):
|
29 |
"""
|
30 |
proc_submission - a helper function for the gradio module to process submissions
|
@@ -60,7 +60,7 @@ def proc_submission(
|
|
60 |
"encoder_no_repeat_ngram_size": 4,
|
61 |
"num_beams": int(num_beams),
|
62 |
"min_length": 100,
|
63 |
-
"max_length": 512
|
64 |
"early_stopping": True,
|
65 |
}
|
66 |
st = time.perf_counter()
|
@@ -201,7 +201,7 @@ if __name__ == "__main__":
|
|
201 |
choices=["LongT5", "LED"], label="Model Architecture", value="LongT5"
|
202 |
)
|
203 |
num_beams = gr.Radio(
|
204 |
-
choices=[2, 3, 4
|
205 |
label="Beam Search: # of Beams",
|
206 |
value=2,
|
207 |
)
|
|
|
24 |
num_beams,
|
25 |
token_batch_length,
|
26 |
length_penalty,
|
27 |
+
max_input_length: int = 1000,
|
28 |
):
|
29 |
"""
|
30 |
proc_submission - a helper function for the gradio module to process submissions
|
|
|
60 |
"encoder_no_repeat_ngram_size": 4,
|
61 |
"num_beams": int(num_beams),
|
62 |
"min_length": 100,
|
63 |
+
"max_length": 512,#int(token_batch_length // 4) if (token_batch_length <500) else 512,
|
64 |
"early_stopping": True,
|
65 |
}
|
66 |
st = time.perf_counter()
|
|
|
201 |
choices=["LongT5", "LED"], label="Model Architecture", value="LongT5"
|
202 |
)
|
203 |
num_beams = gr.Radio(
|
204 |
+
choices=[2, 3, 4],
|
205 |
label="Beam Search: # of Beams",
|
206 |
value=2,
|
207 |
)
|