Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,13 @@ def load_model(cp_path):
|
|
10 |
@st.cache_resource
|
11 |
def load_tokenizer(path):
|
12 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
|
|
13 |
|
14 |
cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
|
15 |
cp_org = 'minnehwg/finetune-newwiki-summarization-ver2'
|
16 |
|
17 |
model_org = load_model(cp_org)
|
18 |
-
model_aug =
|
19 |
tokenizer = load_tokenizer("VietAI/vit5-base")
|
20 |
|
21 |
def summarize(text, model, tokenizer, num_beams=4, device='cpu'):
|
|
|
10 |
@st.cache_resource
|
11 |
def load_tokenizer(path):
|
12 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
13 |
+
return tokenizer
|
14 |
|
15 |
cp_aug = 'minnehwg/finetune-newwiki-summarization-ver-augmented2'
|
16 |
cp_org = 'minnehwg/finetune-newwiki-summarization-ver2'
|
17 |
|
18 |
model_org = load_model(cp_org)
|
19 |
+
model_aug = load_model(cp_aug)
|
20 |
tokenizer = load_tokenizer("VietAI/vit5-base")
|
21 |
|
22 |
def summarize(text, model, tokenizer, num_beams=4, device='cpu'):
|