vsukhoy commited on
Commit
bf06d52
1 Parent(s): 729e201

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,12 +4,13 @@ from transformers import pipeline
4
  generator = pipeline('text-generation', model='gpt2')
5
 
6
  def generate(text):
7
- result = generator(text, max_length=30, num_return_sequences=1)
8
  return result[0]["generated_text"]
9
 
10
  examples = [
11
  ["The Moon's orbit around Earth has"],
12
  ["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
 
13
  ]
14
 
15
  demo = gr.Interface(
 
4
  generator = pipeline('text-generation', model='gpt2')
5
 
6
  def generate(text):
7
+ result = generator(text, max_length=50, num_return_sequences=1)
8
  return result[0]["generated_text"]
9
 
10
  examples = [
11
  ["The Moon's orbit around Earth has"],
12
  ["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
13
+ ["The cat eats – and then it eats again."]
14
  ]
15
 
16
  demo = gr.Interface(