Spaces:
Sleeping
Sleeping
Tolga
commited on
Commit
β’
e068e67
1
Parent(s):
b6d4f50
Update app.py
Browse files
app.py
CHANGED
@@ -38,14 +38,14 @@ def summarize(text):
|
|
38 |
result = summarizer(text, **params)
|
39 |
pred2 = result[0]['summary_text']
|
40 |
|
41 |
-
|
|
|
42 |
|
43 |
#### Display summarized text ####
|
44 |
with gr.Blocks() as demo:
|
45 |
text = gr.Textbox(label="Text", lines=10, placeholder="Enter text here")
|
46 |
t1 = gr.Textbox(label="Output")
|
47 |
-
t2 = gr.Textbox(label="Output2")
|
48 |
btn = gr.Button("Summarise")
|
49 |
-
btn.click(fn=summarize, inputs=text, outputs=[t1,
|
50 |
|
51 |
demo.launch()
|
|
|
38 |
result = summarizer(text, **params)
|
39 |
pred2 = result[0]['summary_text']
|
40 |
|
41 |
+
output = pred + "\n\n" + pred2
|
42 |
+
return output
|
43 |
|
44 |
#### Display summarized text ####
|
45 |
with gr.Blocks() as demo:
|
46 |
text = gr.Textbox(label="Text", lines=10, placeholder="Enter text here")
|
47 |
t1 = gr.Textbox(label="Output")
|
|
|
48 |
btn = gr.Button("Summarise")
|
49 |
+
btn.click(fn=summarize, inputs=text, outputs=[t1,output])
|
50 |
|
51 |
demo.launch()
|