Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ model.to(device)
|
|
18 |
def generate_text(prompt):
|
19 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
20 |
tokens = model.generate(input_ids, max_length=22)
|
21 |
-
return tokenizer.decode(tokens[0].tolist(), skip_special_tokens=
|
22 |
|
23 |
iface = gr.Interface(
|
24 |
fn=generate_text,
|
|
|
18 |
def generate_text(prompt):
|
19 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
20 |
tokens = model.generate(input_ids, max_length=22)
|
21 |
+
return tokenizer.decode(tokens[0].tolist(), skip_special_tokens=False)
|
22 |
|
23 |
iface = gr.Interface(
|
24 |
fn=generate_text,
|