truongghieu commited on
Commit
e602433
1 Parent(s): 3ee1657

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -33,7 +33,7 @@ generation_config = GenerationConfig(
33
 
34
  # Define a function that takes a text input and generates a text output
35
  def generate_text(text):
36
- input_text = text
37
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
38
  output_ids = model.generate(input_ids, generation_config=generation_config)
39
  output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
 
33
 
34
  # Define a function that takes a text input and generates a text output
35
  def generate_text(text):
36
+ input_text = f'###Human: \"{text}\"'
37
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
38
  output_ids = model.generate(input_ids, generation_config=generation_config)
39
  output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)