Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ df_emb = df[['μνμλ² λ©']].copy()
|
|
15 |
|
16 |
|
17 |
def recommend(message):
|
18 |
-
|
19 |
# embedding = model.encode(message)
|
20 |
# df_emb['거리'] = df_emb['μνμλ² λ©'].map(lambda x: cosine_similarity([embedding], [x]).squeeze())
|
21 |
# answer = df.loc[df_emb['거리'].idxmax()]
|
@@ -23,7 +23,7 @@ def recommend(message):
|
|
23 |
# Book_author = answer['μκ°']
|
24 |
# Book_publisher = answer['μΆνμ¬']
|
25 |
# Book_comment = answer['μν']
|
26 |
-
return
|
27 |
|
28 |
gr.ChatInterface(
|
29 |
fn=recommend,
|
|
|
15 |
|
16 |
|
17 |
def recommend(message):
|
18 |
+
answer = df.loc[df_emb['μνμλ² λ©'][0]]
|
19 |
# embedding = model.encode(message)
|
20 |
# df_emb['거리'] = df_emb['μνμλ² λ©'].map(lambda x: cosine_similarity([embedding], [x]).squeeze())
|
21 |
# answer = df.loc[df_emb['거리'].idxmax()]
|
|
|
23 |
# Book_author = answer['μκ°']
|
24 |
# Book_publisher = answer['μΆνμ¬']
|
25 |
# Book_comment = answer['μν']
|
26 |
+
return answer
|
27 |
|
28 |
gr.ChatInterface(
|
29 |
fn=recommend,
|