File size: 337 Bytes
8322d99
7195c6c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline
pipeline = pipeline('summarization')

def doSummary (text):
  output = pipeline(text, max_length = 100, min_length = 20, do_sample=False)
  return output

# output_box = gr.outputs.textbox()
gradio_app = gr.Interface(doSummary, "textbox", outputs = "textbox")
gradio_app.launch(share=True, inline=False)