gamza commited on
Commit
9aa7039
β€’
1 Parent(s): c2ab7a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ df_emb = df[['μ„œν‰μž„λ² λ”©']].copy()
15
 
16
 
17
  def recommend(message):
18
- text = 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,7 +23,7 @@ def recommend(message):
23
  # Book_author = answer['μž‘κ°€']
24
  # Book_publisher = answer['μΆœνŒμ‚¬']
25
  # Book_comment = answer['μ„œν‰']
26
- return message + text
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,