Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,8 +40,8 @@ def chat_with_distilgpt2(input_text, temperature, top_p, top_k):
|
|
| 40 |
# Generate the response using the model with adjusted parameters
|
| 41 |
outputs = model.generate(
|
| 42 |
input_ids,
|
| 43 |
-
max_length=input_ids.shape[1] +
|
| 44 |
-
max_new_tokens=
|
| 45 |
num_return_sequences=1,
|
| 46 |
no_repeat_ngram_size=3,
|
| 47 |
repetition_penalty=1.2,
|
|
|
|
| 40 |
# Generate the response using the model with adjusted parameters
|
| 41 |
outputs = model.generate(
|
| 42 |
input_ids,
|
| 43 |
+
max_length=input_ids.shape[1] + 50, # Limit total length
|
| 44 |
+
max_new_tokens=15,
|
| 45 |
num_return_sequences=1,
|
| 46 |
no_repeat_ngram_size=3,
|
| 47 |
repetition_penalty=1.2,
|