mmcquade's picture
initial commit
a93c77c
raw
history blame
515 Bytes
import gradio as gr
import pandas as pd
from transformers import pipeline
summarizer = pipeline("summarization")
def summarize(text):
return summarizer(text, max_length=250, min_length=30)[0]['summary_text']
gr.Interface(
summarize,
gr.inputs.Textbox(lines=15, placeholder="Enter text here"),
[gr.outputs.Textbox(lines=10, placeholder="Summarized text will appear here")],
title="Text Summarizer",
description="Summarizes text using the transformer library",
examples=[]
).launch()