Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def id_replace_complex(s, threshold=0.4):
|
|
47 |
def generate_candidate_text(s, model, tokenizer, tokenized=False):
|
48 |
|
49 |
out = simpl_tok([s], max_length=256, padding="max_length", truncation=True,
|
50 |
-
return_tensors='pt')
|
51 |
|
52 |
generated_ids = model.generate(
|
53 |
input_ids=out['input_ids'],
|
|
|
47 |
def generate_candidate_text(s, model, tokenizer, tokenized=False):
|
48 |
|
49 |
out = simpl_tok([s], max_length=256, padding="max_length", truncation=True,
|
50 |
+
return_tensors='pt') if not tokenized else s
|
51 |
|
52 |
generated_ids = model.generate(
|
53 |
input_ids=out['input_ids'],
|