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