None1145 commited on
Commit
e012ad3
·
verified ·
1 Parent(s): e3591cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -32,8 +32,7 @@ def respond(
32
  yield "Error: No model loaded. Please load a model first."
33
  return
34
 
35
- response = ""
36
- yield " "
37
 
38
  generation_kwargs = dict(
39
  max_length=8192,
@@ -50,7 +49,8 @@ def respond(
50
  messages = [chatglm_cpp.ChatMessage(role="system", content=system_message)]
51
 
52
  messages.append(chatglm_cpp.ChatMessage(role="user", content=message))
53
-
 
54
  for chunk in pipeline.chat(messages, **generation_kwargs):
55
  response += chunk.content
56
  yield response
 
32
  yield "Error: No model loaded. Please load a model first."
33
  return
34
 
35
+ yield "..."
 
36
 
37
  generation_kwargs = dict(
38
  max_length=8192,
 
49
  messages = [chatglm_cpp.ChatMessage(role="system", content=system_message)]
50
 
51
  messages.append(chatglm_cpp.ChatMessage(role="user", content=message))
52
+
53
+ response = ""
54
  for chunk in pipeline.chat(messages, **generation_kwargs):
55
  response += chunk.content
56
  yield response