Yuvalamitay commited on
Commit
696bce7
·
verified ·
1 Parent(s): a7a8f3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,7 +54,7 @@ model = SentenceTransformer('all-MiniLM-L6-v2')
54
 
55
  def create_embeddings(text_chunks):
56
  # Convert each text chunk into a vector embedding and store as a tensor
57
- chunk_embeddings = model.encode(cleaned_chunks, convert_to_tensor=True) # Replace ... with the text_chunks list
58
 
59
  # Print the chunk embeddings
60
  print(chunk_embeddings)
@@ -111,7 +111,7 @@ def respond(message, history):
111
  str_watch_chunks = "\n".join(best_next_watch)
112
  messages = [
113
  {"role":"system",
114
- "content": "You are a gen-z helpful chatbot that helps teenagers find their next best watch, speak in gen-z terms and be natural. You should answer the users question based on " + str_watch_chunks+ " ."
115
  }
116
  ]
117
  if history:
 
54
 
55
  def create_embeddings(text_chunks):
56
  # Convert each text chunk into a vector embedding and store as a tensor
57
+ chunk_embeddings = model.encode(text_chunks, convert_to_tensor=True) # Replace ... with the text_chunks list
58
 
59
  # Print the chunk embeddings
60
  print(chunk_embeddings)
 
111
  str_watch_chunks = "\n".join(best_next_watch)
112
  messages = [
113
  {"role":"system",
114
+ "content": "You are a gen-z helpful chatbot that helps teenagers find their next best watch, speak in gen-z terms and be natural. You should answer the users question based on " + str_watch_chunks + " ."
115
  }
116
  ]
117
  if history: