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