Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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()
|