truongghieu
commited on
Commit
•
1db8934
1
Parent(s):
f829fe6
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def generate_text(*args):
|
|
38 |
max_new_tokens=args[6],
|
39 |
pad_token_id=tokenizer.eos_token_id
|
40 |
)
|
41 |
-
input_text = f'
|
42 |
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
43 |
output_ids = model.generate(input_ids, generation_config=generation_config)
|
44 |
output_text = tokenizer.decode(output_ids[0])
|
|
|
38 |
max_new_tokens=args[6],
|
39 |
pad_token_id=tokenizer.eos_token_id
|
40 |
)
|
41 |
+
input_text = f'{args[0]}'
|
42 |
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
43 |
output_ids = model.generate(input_ids, generation_config=generation_config)
|
44 |
output_text = tokenizer.decode(output_ids[0])
|