ColeGuion commited on
Commit
bab84e2
1 Parent(s): 5065ff5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ def correct_text(text, genConfig):
13
  corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
14
  return corrected_text
15
 
16
- def respond(text, max_new_tokens, min_new_tokens, num_beams, num_beam_groups, temperature, top_k, top_p, no_repeat_ngram_size, guidance_scale):
17
  config = GenerationConfig(
18
  max_new_tokens=max_new_tokens,
19
  min_new_tokens=min_new_tokens,
@@ -24,7 +24,7 @@ def respond(text, max_new_tokens, min_new_tokens, num_beams, num_beam_groups, te
24
  top_p=float(top_p),
25
  no_repeat_ngram_size=no_repeat_ngram_size,
26
  early_stopping=True,
27
- do_sample=True
28
  )
29
 
30
  if guidance_scale > 0:
 
13
  corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
14
  return corrected_text
15
 
16
+ def respond(text, max_new_tokens, min_new_tokens, num_beams, num_beam_groups, temperature, top_k, top_p, no_repeat_ngram_size, guidance_scale, do_sample: bool):
17
  config = GenerationConfig(
18
  max_new_tokens=max_new_tokens,
19
  min_new_tokens=min_new_tokens,
 
24
  top_p=float(top_p),
25
  no_repeat_ngram_size=no_repeat_ngram_size,
26
  early_stopping=True,
27
+ do_sample=do_sample
28
  )
29
 
30
  if guidance_scale > 0: