skylersterling commited on
Commit
23329aa
·
verified ·
1 Parent(s): 8baf022

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,11 +14,12 @@ model.to('cpu')
14
 
15
  # Define the function that generates text from a prompt
16
  def generate_text(prompt, temperature, top_p=1.0):
 
 
 
17
  prompt_with_eos = " #CONTEXT# " + prompt + " #TOPIC# " # Add the string "EOS" to the end of the prompt
18
  input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
19
 
20
- print(prompt_with_eos)
21
-
22
  input_tokens = input_tokens.to('cpu')
23
 
24
  generated_text = prompt_with_eos # Start with the initial prompt plus "EOS"
 
14
 
15
  # Define the function that generates text from a prompt
16
  def generate_text(prompt, temperature, top_p=1.0):
17
+
18
+ print(prompt)
19
+
20
  prompt_with_eos = " #CONTEXT# " + prompt + " #TOPIC# " # Add the string "EOS" to the end of the prompt
21
  input_tokens = tokenizer.encode(prompt_with_eos, return_tensors='pt')
22
 
 
 
23
  input_tokens = input_tokens.to('cpu')
24
 
25
  generated_text = prompt_with_eos # Start with the initial prompt plus "EOS"