Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,10 @@ examples = [["μμ¦ μ μ΄ μ μ¨λ€"]]
|
|
10 |
|
11 |
model = SentenceTransformer('jhgan/ko-sroberta-multitask')
|
12 |
|
|
|
|
|
|
|
|
|
13 |
def recommend(message):
|
14 |
embedding = model.encode(message)
|
15 |
df_emb['거리'] = df_emb['μνμλ² λ©'].map(lambda x: cosine_similarity([embedding], [x]).squeeze())
|
|
|
10 |
|
11 |
model = SentenceTransformer('jhgan/ko-sroberta-multitask')
|
12 |
|
13 |
+
df = pd.read_pickle('BookData_emb.pkl')
|
14 |
+
df_emb = df[['μνμλ² λ©']].copy()
|
15 |
+
|
16 |
+
|
17 |
def recommend(message):
|
18 |
embedding = model.encode(message)
|
19 |
df_emb['거리'] = df_emb['μνμλ² λ©'].map(lambda x: cosine_similarity([embedding], [x]).squeeze())
|