text_summry / main.py
moustafa0's picture
Create main.py
bb68202 verified
raw
history blame
285 Bytes
import gradio as gr
from transformers import pipeline
text_summry = pipeline("summarization", model="facebook/bart-large-cnn")
def summry(input):
output=text_summry(input)
return output
gr.close_all()
demo=gr.Interface(fn=summry,inputs="text",outputs="text")
demo.launch()