None1145 commited on
Commit
b3068c3
·
verified ·
1 Parent(s): 7245df1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -26,7 +26,7 @@ model = f"./Models/{repo_id}/{filename}"
26
  max_length = 8192
27
  pipeline = chatglm_cpp.Pipeline(model, max_length=max_length)
28
 
29
- messages = []
30
 
31
  def respond(
32
  message,
@@ -36,9 +36,9 @@ def respond(
36
  temperature,
37
  top_p,
38
  ):
39
- global messages
40
 
41
- print(messages)
42
 
43
  generation_kwargs = dict(
44
  max_length=max_length,
@@ -51,8 +51,8 @@ def respond(
51
  stream=True,
52
  )
53
 
54
- if messages == []:
55
- messages = [chatglm_cpp.ChatMessage(role="system", content=system_message)]
56
 
57
  print(messages)
58
 
 
26
  max_length = 8192
27
  pipeline = chatglm_cpp.Pipeline(model, max_length=max_length)
28
 
29
+ # messages = []
30
 
31
  def respond(
32
  message,
 
36
  temperature,
37
  top_p,
38
  ):
39
+ # global messages
40
 
41
+ # print(messages)
42
 
43
  generation_kwargs = dict(
44
  max_length=max_length,
 
51
  stream=True,
52
  )
53
 
54
+ # if messages == []:
55
+ messages = [chatglm_cpp.ChatMessage(role="system", content=system_message)]
56
 
57
  print(messages)
58