Update app.py
Browse files
app.py
CHANGED
@@ -39,10 +39,11 @@ def generate(title, context, max_len):
|
|
39 |
|
40 |
title_ids = tokenizer.encode(title, add_special_tokens=False)
|
41 |
context_ids = tokenizer.encode(context, add_special_tokens=False)
|
42 |
-
print(title_ids,context_ids)
|
43 |
|
44 |
input_ids = title_ids + [sep_id] + context_ids
|
45 |
-
|
|
|
|
|
46 |
cur_len = len(input_ids)
|
47 |
input_len = cur_len
|
48 |
last_token_id = input_ids[-1]
|
|
|
39 |
|
40 |
title_ids = tokenizer.encode(title, add_special_tokens=False)
|
41 |
context_ids = tokenizer.encode(context, add_special_tokens=False)
|
|
|
42 |
|
43 |
input_ids = title_ids + [sep_id] + context_ids
|
44 |
+
|
45 |
+
print(input_ids)
|
46 |
+
|
47 |
cur_len = len(input_ids)
|
48 |
input_len = cur_len
|
49 |
last_token_id = input_ids[-1]
|