Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
| 16 |
|
| 17 |
MAX_INPUT_TOKEN_LENGTH = 4096
|
| 18 |
|
| 19 |
-
def generate_response(input_text, temperature=0.
|
| 20 |
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(model.device)
|
| 21 |
|
| 22 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
|
|
|
| 16 |
|
| 17 |
MAX_INPUT_TOKEN_LENGTH = 4096
|
| 18 |
|
| 19 |
+
def generate_response(input_text, temperature=0.2, max_new_tokens=50):
|
| 20 |
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(model.device)
|
| 21 |
|
| 22 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|