Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ gpt2 = pipeline('text-generation', model = "Lifan-Z/Chinese-Classic-Poem-Generat
|
|
6 |
|
7 |
def poems(st):
|
8 |
poems=""
|
9 |
-
sequences = gpt2('<|endoftext|>'+st, max_length=50, do_sample=True, top_k=
|
10 |
i=0
|
11 |
for seq in sequences:
|
12 |
if (len(seq.get('generated_text')) == 108):
|
|
|
6 |
|
7 |
def poems(st):
|
8 |
poems=""
|
9 |
+
sequences = gpt2('<|endoftext|>'+st, max_length=50, do_sample=True, top_k=20, top_p=0.9, repetition_penalty=1.2, num_return_sequences=20, eos_token_id=0)
|
10 |
i=0
|
11 |
for seq in sequences:
|
12 |
if (len(seq.get('generated_text')) == 108):
|