Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ image = Image.open("logo.webp") # Replace 'logo.webp' with your actual WEBP fil
|
|
13 |
st.image(image, caption="Sentiment Analysis App", use_column_width=True)
|
14 |
|
15 |
# Load the model and tokenizer
|
16 |
-
@st.
|
17 |
def load_model():
|
18 |
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
|
19 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=8)
|
|
|
13 |
st.image(image, caption="Sentiment Analysis App", use_column_width=True)
|
14 |
|
15 |
# Load the model and tokenizer
|
16 |
+
@st.cache_resource
|
17 |
def load_model():
|
18 |
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
|
19 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=8)
|