ysharma HF staff commited on
Commit
5d23cab
1 Parent(s): 23eb0dd

updated logging

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -30,13 +30,16 @@ def user(message, history):
30
 
31
 
32
  def chat(history, top_p, top_k, temperature):
 
 
33
  # Initialize a StopOnTokens object
34
  stop = StopOnTokens()
35
 
36
  # Construct the input message string for the model by concatenating the current system message and conversation history
37
  messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]]) #curr_system_message +
38
  for item in history])
39
-
 
40
  # Tokenize the messages string
41
  model_inputs = tok([messages], return_tensors="pt").to("cuda")
42
  streamer = TextIteratorStreamer(
 
30
 
31
 
32
  def chat(history, top_p, top_k, temperature):
33
+
34
+ print(f"history is - {history}")
35
  # Initialize a StopOnTokens object
36
  stop = StopOnTokens()
37
 
38
  # Construct the input message string for the model by concatenating the current system message and conversation history
39
  messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]]) #curr_system_message +
40
  for item in history])
41
+ print(f"messages is - {messages}")
42
+
43
  # Tokenize the messages string
44
  model_inputs = tok([messages], return_tensors="pt").to("cuda")
45
  streamer = TextIteratorStreamer(