Update app.py
Browse files
app.py
CHANGED
@@ -12,15 +12,15 @@ from sklearn.manifold import TSNE
|
|
12 |
|
13 |
@st.cache
|
14 |
def load_model():
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
st.title("Sentence Embedding for Spanish with Bertin")
|
26 |
st.write("Sentence embedding for spanish trained on NLI. Used for Sentence Textual Similarity. Based on the model hackathon-pln-es/bertin-roberta-base-finetuning-esnli.")
|
|
|
12 |
|
13 |
@st.cache
|
14 |
def load_model():
|
15 |
+
model = SentenceTransformer('hackathon-pln-es/bertin-roberta-base-finetuning-esnli')
|
16 |
+
model.eval()
|
17 |
+
return model
|
18 |
+
|
19 |
+
@st.cache
|
20 |
+
def load_plot_data():
|
21 |
+
embs = np.load('semeval2015-embs.npy')
|
22 |
+
data = pd.read_csv('semeval2015-data.csv')
|
23 |
+
return embs, data
|
24 |
|
25 |
st.title("Sentence Embedding for Spanish with Bertin")
|
26 |
st.write("Sentence embedding for spanish trained on NLI. Used for Sentence Textual Similarity. Based on the model hackathon-pln-es/bertin-roberta-base-finetuning-esnli.")
|