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