skylersterling commited on
Commit
d30890d
·
verified ·
1 Parent(s): b369624

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,7 +14,7 @@ model.to('cpu')
14
 
15
  # Define the function that generates text from a prompt
16
  def generate_text(prompt, temperature, top_p):
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')
@@ -48,8 +48,8 @@ interface = gr.Interface(
48
  fn=generate_text,
49
  inputs=[
50
  gr.Textbox(lines=2, placeholder="Enter your prompt here..."),
51
- gr.Slider(minimum=0.1, maximum=1.0, value=0.3, label="Temperature"),
52
- gr.Slider(minimum=0.05, maximum=1.0, value=0.3, label="Top-p")
53
  ],
54
  outputs=gr.Textbox(),
55
  live=False,
 
14
 
15
  # Define the function that generates text from a prompt
16
  def generate_text(prompt, temperature, top_p):
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')
 
48
  fn=generate_text,
49
  inputs=[
50
  gr.Textbox(lines=2, placeholder="Enter your prompt here..."),
51
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.1, label="Temperature"),
52
+ gr.Slider(minimum=0.05, maximum=1.0, value=0.1, label="Top-p")
53
  ],
54
  outputs=gr.Textbox(),
55
  live=False,