ms1449 commited on
Commit
9c3d50e
·
verified ·
1 Parent(s): c1e7515

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import streamlit as st
2
- from transformers import BartTokenizer, BartForConditionalGeneration
3
 
4
  @st.cache_resource
5
  def load_model():
6
- model_path = "bart_small_samsum" # Update this if your model path is different
7
- tokenizer = BartTokenizer.from_pretrained(model_path)
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