Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ def split_paragraph(paragraph, max_chunk_size=1024):
|
|
23 |
|
24 |
def launch(input):
|
25 |
if len(input) > 1024:
|
26 |
-
return " ".join([res
|
27 |
-
return generator(input)[0]
|
28 |
|
29 |
iface = gr.Interface(launch, inputs="text", outputs="text")
|
30 |
iface.launch()
|
|
|
23 |
|
24 |
def launch(input):
|
25 |
if len(input) > 1024:
|
26 |
+
return " ".join([res["generated_text"] for res in generator(split_paragraph(input))])
|
27 |
+
return generator(input)[0]["generated_text"]
|
28 |
|
29 |
iface = gr.Interface(launch, inputs="text", outputs="text")
|
30 |
iface.launch()
|