Spaces:
Paused
Paused
Fixed it?
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def generate(
|
|
| 44 |
current_input += message
|
| 45 |
|
| 46 |
device = "cuda:0"
|
| 47 |
-
inputs_ids = tokenizer(
|
| 48 |
|
| 49 |
if len(input_ids) > MAX_INPUT_TOKEN_LENGTH:
|
| 50 |
input_ids = input_ids[-MAX_INPUT_TOKEN_LENGTH:]
|
|
|
|
| 44 |
current_input += message
|
| 45 |
|
| 46 |
device = "cuda:0"
|
| 47 |
+
inputs_ids = tokenizer(current_input, return_tensors="pt").to(device)
|
| 48 |
|
| 49 |
if len(input_ids) > MAX_INPUT_TOKEN_LENGTH:
|
| 50 |
input_ids = input_ids[-MAX_INPUT_TOKEN_LENGTH:]
|