Spaces:
Running
Running
Update app.py
Browse files
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
|
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):
|