Commit
·
265de56
1
Parent(s):
10e5029
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def generate_text(*args):
|
|
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]
|
45 |
return output_text
|
46 |
|
47 |
def gpt_generate(*args):
|
|
|
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])
|
45 |
return output_text
|
46 |
|
47 |
def gpt_generate(*args):
|