Lifan-Z commited on
Commit
01ea506
1 Parent(s): 77f0385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=950, 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):
 
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):