zmbfeng commited on
Commit
57ca910
·
verified ·
1 Parent(s): 5f35567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -68,8 +68,10 @@ def create_response_untethered(input_str,
68
  repetition_penalty,
69
  top_p,
70
  # top_k,
71
- do_sample):
 
72
  print("input_str="+input_str)
 
73
  # num_beams = int(num_beams)
74
  # print("num_beams=" + str(num_beams))
75
  num_return_sequences=int(num_return_sequences)
@@ -245,7 +247,8 @@ interface2 = gr.Interface(fn=create_response_untethered,
245
  "This results in a deterministic and fluent output, but it might also lack diversity and creativity" +
246
  "If is set to True, the generate function will use stochastic sampling, which means that it will randomly" +
247
  " select a word from the probability distribution at each step. This results in a more diverse and creative" +
248
- " output, but it might also introduce errors and inconsistencies ", value=True)
 
249
  ], outputs=[gr.Textbox(label="output response", lines=30)])
250
 
251
  interface3 = gr.Interface(fn=create_response_untethered_paraphrased,
 
68
  repetition_penalty,
69
  top_p,
70
  # top_k,
71
+ do_sample,
72
+ model_name):
73
  print("input_str="+input_str)
74
+ print("model_name="+model_name)
75
  # num_beams = int(num_beams)
76
  # print("num_beams=" + str(num_beams))
77
  num_return_sequences=int(num_return_sequences)
 
247
  "This results in a deterministic and fluent output, but it might also lack diversity and creativity" +
248
  "If is set to True, the generate function will use stochastic sampling, which means that it will randomly" +
249
  " select a word from the probability distribution at each step. This results in a more diverse and creative" +
250
+ " output, but it might also introduce errors and inconsistencies ", value=True),
251
+ gr.TextBook(value="untethered_model_name",visible=False)
252
  ], outputs=[gr.Textbox(label="output response", lines=30)])
253
 
254
  interface3 = gr.Interface(fn=create_response_untethered_paraphrased,