SilviaRM commited on
Commit
a889de8
·
verified ·
1 Parent(s): 4b9e340

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import gradio as gr
3
 
4
  from transformers import pipeline
@@ -10,5 +9,10 @@ def summarize(input):
10
  return output[0]['summary_text']
11
 
12
  gr.close_all()
13
- demo = gr.Interface(fn=summarize, inputs="text", outputs="text")
 
 
 
 
 
14
  demo.launch(share=True)
 
 
1
  import gradio as gr
2
 
3
  from transformers import pipeline
 
9
  return output[0]['summary_text']
10
 
11
  gr.close_all()
12
+ demo = gr.Interface(fn=summarize,
13
+ inputs=[gr.Textbox(label="Text to summarize", lines=6)],
14
+ outputs=[gr.Textbox(label="Result", lines=3)],
15
+ title="Text summarization with distilbart-cnn",
16
+ description="Summarize any text using the `Falconsai/text_summarization` model under the hood!"
17
+ )
18
  demo.launch(share=True)