juewang commited on
Commit
652d8ad
1 Parent(s): 5ebf2f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -27,6 +27,7 @@ def infer(
27
  num_completions = int(num_completions)
28
  temperature = float(temperature)
29
  top_p = float(top_p)
 
30
  stop = stop.split(";")
31
  seed = seed
32
 
@@ -34,6 +35,7 @@ def infer(
34
  assert 1 <= num_completions <= 5
35
  assert 0.0 <= temperature <= 10.0
36
  assert 0.0 <= top_p <= 1.0
 
37
 
38
  if temperature == 0.0:
39
  temperature = 0.01
 
27
  num_completions = int(num_completions)
28
  temperature = float(temperature)
29
  top_p = float(top_p)
30
+ top_k = int(top_k)
31
  stop = stop.split(";")
32
  seed = seed
33
 
 
35
  assert 1 <= num_completions <= 5
36
  assert 0.0 <= temperature <= 10.0
37
  assert 0.0 <= top_p <= 1.0
38
+ assert 1 <= top_k <= 1000
39
 
40
  if temperature == 0.0:
41
  temperature = 0.01