Younes Belkada commited on
Commit
2c122c8
1 Parent(s): 4da5c39

fix small nit

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ def query(payload):
37
 
38
  def inference(input_sentence, max_length, no_repeat_ngram_size, num_beams, temperature,top_k, top_p, greedy_decoding, seed=42):
39
  top_k = None if top_k == 0 else top_k
40
- greedy = False if num_beams > 0
41
  payload = {"inputs": input_sentence,
42
  "parameters": {"max_new_tokens": max_length, "top_k": top_k, "top_p": top_p, "temperature": temperature,
43
  "do_sample": not greedy_decoding, "seed": seed, "early_stopping":num_beams > 0, "no_repeat_ngram_size":no_repeat_ngram_size}}
 
37
 
38
  def inference(input_sentence, max_length, no_repeat_ngram_size, num_beams, temperature,top_k, top_p, greedy_decoding, seed=42):
39
  top_k = None if top_k == 0 else top_k
40
+ greedy = False if num_beams > 0 else greedy_decoding
41
  payload = {"inputs": input_sentence,
42
  "parameters": {"max_new_tokens": max_length, "top_k": top_k, "top_p": top_p, "temperature": temperature,
43
  "do_sample": not greedy_decoding, "seed": seed, "early_stopping":num_beams > 0, "no_repeat_ngram_size":no_repeat_ngram_size}}