Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import
|
3 |
|
4 |
@st.cache_resource
|
5 |
def load_model():
|
6 |
-
model_path = "bart_small_samsum" #
|
7 |
-
tokenizer =
|
8 |
model = BartForConditionalGeneration.from_pretrained(model_path)
|
9 |
return tokenizer, model
|
10 |
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import BartTokenizerFast, BartForConditionalGeneration
|
3 |
|
4 |
@st.cache_resource
|
5 |
def load_model():
|
6 |
+
model_path = "bart_small_samsum" # model path
|
7 |
+
tokenizer = BartTokenizerFast.from_pretrained(model_path)
|
8 |
model = BartForConditionalGeneration.from_pretrained(model_path)
|
9 |
return tokenizer, model
|
10 |
|