nab3588 commited on
Commit
4873685
·
verified ·
1 Parent(s): b85da2b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -2
src/streamlit_app.py CHANGED
@@ -26,8 +26,8 @@ st.markdown("Masukkan hingga **15 ulasan pelanggan** untuk mengetahui tingkat ke
26
  @st.cache_resource
27
  def load_model():
28
  model_name = "w11wo/indonesian-roberta-base-sentiment-classifier"
29
- tokenizer = AutoTokenizer.from_pretrained(model_name)
30
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
31
  return pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
32
 
33
  sentiment_model = load_model()
 
26
  @st.cache_resource
27
  def load_model():
28
  model_name = "w11wo/indonesian-roberta-base-sentiment-classifier"
29
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
30
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, trust_remote_code=True)
31
  return pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
32
 
33
  sentiment_model = load_model()