zmbfeng commited on
Commit
c27f13b
·
verified ·
1 Parent(s): 721ea62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -25,11 +25,15 @@ def create_response_original(input_str,
25
  num_return_sequences=int(num_return_sequences)
26
  print("num_return_sequences" + str(num_return_sequences))
27
  print("top_p" + str(top_p))
 
28
  print("top_k" + str(top_k))
29
  print("repetition_penalty" + str(repetition_penalty))
30
  print("temperature" + str(temperature))
31
  print("do_sample" + str(do_sample))
32
-
 
 
 
33
  #output_raw= generator(input_str)
34
  """print (output_raw)"""
35
 
 
25
  num_return_sequences=int(num_return_sequences)
26
  print("num_return_sequences" + str(num_return_sequences))
27
  print("top_p" + str(top_p))
28
+ top_k=int(top_k)
29
  print("top_k" + str(top_k))
30
  print("repetition_penalty" + str(repetition_penalty))
31
  print("temperature" + str(temperature))
32
  print("do_sample" + str(do_sample))
33
+ if not do_sample:
34
+ num_beams = 1
35
+ print("num_beams=" + str(num_beams))
36
+
37
  #output_raw= generator(input_str)
38
  """print (output_raw)"""
39