skylersterling commited on
Commit
902fbf1
·
verified ·
1 Parent(s): acbde2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,8 +13,8 @@ model.eval()
13
  model.to('cpu')
14
 
15
  # Define the function that generates text from a prompt
16
- def generate_text(prompt, temperature=0.1, top_p=0.2, max_tokens=10):
17
- prompt_with_eos = prompt + " >" # Add the "EOS" to the end of the prompt
18
  input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
19
 
20
  input_tokens = input_tokens.to('cpu')
 
13
  model.to('cpu')
14
 
15
  # Define the function that generates text from a prompt
16
+ def generate_text(prompt, temperature=0.1, top_p=0.2, max_tokens=3):
17
+ prompt_with_eos = prompt + " > " # Add the "EOS" to the end of the prompt
18
  input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
19
 
20
  input_tokens = input_tokens.to('cpu')