Spaces:
Paused
Paused
clean
Browse files
app.py
CHANGED
|
@@ -47,12 +47,7 @@ def generate(
|
|
| 47 |
current_input += message
|
| 48 |
|
| 49 |
device = "cuda:0"
|
| 50 |
-
print(current_input)
|
| 51 |
input_ids = tokenizer(current_input, return_tensors="pt").input_ids.to(device)
|
| 52 |
-
|
| 53 |
-
outputs = model.generate(input_ids, max_new_tokens=100)
|
| 54 |
-
|
| 55 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
| 56 |
|
| 57 |
|
| 58 |
if len(input_ids) > MAX_INPUT_TOKEN_LENGTH:
|
|
|
|
| 47 |
current_input += message
|
| 48 |
|
| 49 |
device = "cuda:0"
|
|
|
|
| 50 |
input_ids = tokenizer(current_input, return_tensors="pt").input_ids.to(device)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
|
| 53 |
if len(input_ids) > MAX_INPUT_TOKEN_LENGTH:
|