Spaces:
Runtime error
Runtime error
Stefan Dumitrescu
commited on
Commit
•
c485299
1
Parent(s):
b26e605
Update
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ def setModel(model_checkpoint):
|
|
36 |
return model, tokenizer
|
37 |
|
38 |
def infer(model, tokenizer, text, max_length, temperature, top_k, top_p):
|
39 |
-
encoded_prompt = tokenizer
|
|
|
40 |
output_sequences = model.generate(
|
41 |
input_ids=encoded_prompt.input_ids,
|
42 |
max_length=max_length,
|
|
|
36 |
return model, tokenizer
|
37 |
|
38 |
def infer(model, tokenizer, text, max_length, temperature, top_k, top_p):
|
39 |
+
encoded_prompt = tokenizer(text, add_special_tokens=False, return_tensors="pt")
|
40 |
+
|
41 |
output_sequences = model.generate(
|
42 |
input_ids=encoded_prompt.input_ids,
|
43 |
max_length=max_length,
|