Commit
·
10e5029
1
Parent(s):
1138395
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def generate_text(*args):
|
|
40 |
)
|
41 |
input_text = f'###Human: \"{args[0]}\"'
|
42 |
input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
43 |
-
output_ids = model.generate(
|
44 |
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
45 |
return output_text
|
46 |
|
|
|
40 |
)
|
41 |
input_text = f'###Human: \"{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], skip_special_tokens=True)
|
45 |
return output_text
|
46 |
|