Text_Summary / app.py
AjayKr09's picture
Update app.py
6b95f4e verified
raw
history blame contribute delete
389 Bytes
import streamlit as st
import pandas as pd
import numpy as np
import torch
import transformers
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("summarization", model="facebook/bart-large-xsum")
st.write('\n')
st.write('Enter Text for Summarization:')
text=st.text_input("")
if st.button("Submit"):
st.write(pipe(text)[0]["summary_text"])