minnehwg commited on
Commit
d985529
1 Parent(s): 0c350d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -4,5 +4,18 @@ import streamlit
4
 
5
  cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
6
 
 
 
 
 
 
7
 
8
- tokenizer, model_aug = load_model(cp_aug)
 
 
 
 
 
 
 
 
 
4
 
5
  cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
6
 
7
+ @st.cache_resource
8
+ def get_model():
9
+ checkpoint = cp_aug
10
+ tokenizer, model = load_model(checkpoint)
11
+ return tokenizer, model
12
 
13
+
14
+ st.title("Chào mừng đến với hệ thống tóm tắt của Minne >.< ")
15
+ tokenizer, model = get_model()
16
+ input_text = st.text_area("Enter your URL:")
17
+
18
+ if st.button("Generate"):
19
+ output_text = pipeline(input_text)
20
+
21
+ st.text_area("Generated Text:", value=output_text, height=200)