Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,7 @@ def generate_text(
|
|
| 52 |
logging.info(f"Input too long {input_len} > {abs_max_length}, may cause errors")
|
| 53 |
result = generator(
|
| 54 |
prompt,
|
| 55 |
-
|
| 56 |
-
max_length=None,
|
| 57 |
-
max_new_tokens=gen_length,
|
| 58 |
min_length=input_len + 4,
|
| 59 |
penalty_alpha=penalty_alpha,
|
| 60 |
top_k=top_k,
|
|
|
|
| 52 |
logging.info(f"Input too long {input_len} > {abs_max_length}, may cause errors")
|
| 53 |
result = generator(
|
| 54 |
prompt,
|
| 55 |
+
max_length=gen_length + input_len, # old API for generation
|
|
|
|
|
|
|
| 56 |
min_length=input_len + 4,
|
| 57 |
penalty_alpha=penalty_alpha,
|
| 58 |
top_k=top_k,
|