minnehwg's picture
Update app.py
d985529 verified
raw
history blame contribute delete
568 Bytes
from util import pipeline
from util import load_model
import streamlit
cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
@st.cache_resource
def get_model():
checkpoint = cp_aug
tokenizer, model = load_model(checkpoint)
return tokenizer, model
st.title("Chào mừng đến với hệ thống tóm tắt của Minne >.< ")
tokenizer, model = get_model()
input_text = st.text_area("Enter your URL:")
if st.button("Generate"):
output_text = pipeline(input_text)
st.text_area("Generated Text:", value=output_text, height=200)