kastan commited on
Commit
d2baf43
Β·
1 Parent(s): d41e1bf

printing history

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -125,12 +125,19 @@ def predict(
125
  chat = [(history[i].strip(), history[i + 1].strip()) for i in range(0, len(history) - 1, 2)]
126
  final_chat_response = chat
127
  yield chat, history, None, None, None, []
 
 
 
128
 
129
  # Pinecone context retrieval
130
  top_context_list = ta.retrieve_contexts_from_pinecone(user_question=inputs, topk=NUM_ANSWERS_GENERATED)
131
  # yield chat, history, top_context_list[0], top_context_list[1], top_context_list[2], []
 
 
132
  yield final_chat_response, history, top_context_list[0], top_context_list[1], top_context_list[2], []
133
 
 
 
134
  # run CLIP
135
  images_list = ta.clip_text_to_image(inputs)
136
  # yield chat, history, top_context_list[0], top_context_list[1], top_context_list[2], images_list
 
125
  chat = [(history[i].strip(), history[i + 1].strip()) for i in range(0, len(history) - 1, 2)]
126
  final_chat_response = chat
127
  yield chat, history, None, None, None, []
128
+
129
+ print("1. final_chat_response:", final_chat_response)
130
+ print("1. history:", history)
131
 
132
  # Pinecone context retrieval
133
  top_context_list = ta.retrieve_contexts_from_pinecone(user_question=inputs, topk=NUM_ANSWERS_GENERATED)
134
  # yield chat, history, top_context_list[0], top_context_list[1], top_context_list[2], []
135
+ print("2. final_chat_response", final_chat_response)
136
+ print("2. history:", history)
137
  yield final_chat_response, history, top_context_list[0], top_context_list[1], top_context_list[2], []
138
 
139
+ print("3. final_chat_response", final_chat_response)
140
+ print("3. history:", history)
141
  # run CLIP
142
  images_list = ta.clip_text_to_image(inputs)
143
  # yield chat, history, top_context_list[0], top_context_list[1], top_context_list[2], images_list