vilarin commited on
Commit
285cc01
1 Parent(s): 0fffdb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -53,7 +53,7 @@ def stream_chat(
53
  ):
54
  print(f'message: {message}')
55
  print(f'history: {history}')
56
- for resp, history in model.chat(
57
  tokenizer,
58
  query = message,
59
  history = history,
@@ -62,8 +62,8 @@ def stream_chat(
62
  top_p = top_p,
63
  top_k = top_k,
64
  temperature = temperature,
65
- ):
66
- yield resp
67
 
68
 
69
  chatbot = gr.Chatbot(height=600, placeholder=PLACEHOLDER)
 
53
  ):
54
  print(f'message: {message}')
55
  print(f'history: {history}')
56
+ resp, history = model.chat(
57
  tokenizer,
58
  query = message,
59
  history = history,
 
62
  top_p = top_p,
63
  top_k = top_k,
64
  temperature = temperature,
65
+ )
66
+ return resp
67
 
68
 
69
  chatbot = gr.Chatbot(height=600, placeholder=PLACEHOLDER)