Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,12 +54,12 @@ def load_models():
|
|
54 |
return tokenizer, bert_model, emotion_classifier
|
55 |
|
56 |
@st.cache_data
|
57 |
-
def cache_embeddings(text,
|
58 |
-
return get_embedding_for_text(text,
|
59 |
|
60 |
@st.cache_data
|
61 |
-
def cache_emotion_classification(text,
|
62 |
-
return classify_emotion(text,
|
63 |
|
64 |
@st.cache_data
|
65 |
def split_text(text, max_length=512):
|
|
|
54 |
return tokenizer, bert_model, emotion_classifier
|
55 |
|
56 |
@st.cache_data
|
57 |
+
def cache_embeddings(text, _tokenizer, _model):
|
58 |
+
return get_embedding_for_text(text, _tokenizer, _model)
|
59 |
|
60 |
@st.cache_data
|
61 |
+
def cache_emotion_classification(text, _classifier):
|
62 |
+
return classify_emotion(text, _classifier)
|
63 |
|
64 |
@st.cache_data
|
65 |
def split_text(text, max_length=512):
|