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