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