vpcom commited on
Commit
a3aed2a
·
1 Parent(s): af4a236

feat: use the current generation params

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -142,12 +142,14 @@ chat_interface = gr.ChatInterface(
142
  cache_examples=False,
143
  )
144
 
145
- def evolve_text(textbox):
146
 
147
  possible_generation = "".join([x for x in generate(
148
- textbox, "", "<|endoftext|>",
149
- temperature=additional_inputs[1].value, max_new_tokens=10,
150
- top_p=0.95, repetition_penalty=1.2,
 
 
151
  seed=42,
152
  )][-1]) #TODO: need a smarter way to do this
153
 
 
142
  cache_examples=False,
143
  )
144
 
145
+ def evolve_text(x):
146
 
147
  possible_generation = "".join([x for x in generate(
148
+ x, "", additional_inputs[0].value,
149
+ temperature=additional_inputs[1].value,
150
+ max_new_tokens=additional_inputs[2].value,
151
+ top_p=additional_inputs[3].value,
152
+ repetition_penalty=additional_inputs[4].value,
153
  seed=42,
154
  )][-1]) #TODO: need a smarter way to do this
155