Tolga commited on
Commit
e068e67
β€’
1 Parent(s): b6d4f50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,14 +38,14 @@ def summarize(text):
38
  result = summarizer(text, **params)
39
  pred2 = result[0]['summary_text']
40
 
41
- return pred, pred2
 
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,t2])
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()