merve HF staff commited on
Commit
6cd2c6a
1 Parent(s): 9c2d896

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ model = AutoModelWithLMHead.from_pretrained("gpt2-large")
10
 
11
 
12
 
13
- def infer(input_ids, max_length, temperature, top_k, top_p, do_sample, num_return_sequences):
14
 
15
  output_sequences = model.generate(
16
  input_ids=input_ids,
@@ -44,7 +44,7 @@ else:
44
  input_ids = encoded_prompt
45
 
46
 
47
- output_sequences = infer(input_ids, max_length, temperature, top_k, top_p, do_sample, num_return_sequences)
48
 
49
 
50
  for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
 
10
 
11
 
12
 
13
+ def infer(input_ids, max_length, temperature, top_k, top_p, do_sample = True num_return_sequences):
14
 
15
  output_sequences = model.generate(
16
  input_ids=input_ids,
 
44
  input_ids = encoded_prompt
45
 
46
 
47
+ output_sequences = infer(input_ids, max_length, temperature, top_k, top_p, do_sample = True, num_return_sequences)
48
 
49
 
50
  for generated_sequence_idx, generated_sequence in enumerate(output_sequences):