lachine commited on
Commit
30be031
·
1 Parent(s): b09a340

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -5,7 +5,6 @@ set_seed(randint(randint(1000,10000),randint(50000,300000)))
5
  import gradio as gr
6
 
7
  def gpt2(string):
8
- text = generator(text, max_length=250, num_return_sequences=1)
9
- return text[0]['generated_text']
10
  iface = gr.Interface(fn=gpt2, inputs="text", outputs="text")
11
  iface.launch()
 
5
  import gradio as gr
6
 
7
  def gpt2(string):
8
+ return generator(text, max_length=250, num_return_sequences=1)[0]['generated_text']
 
9
  iface = gr.Interface(fn=gpt2, inputs="text", outputs="text")
10
  iface.launch()