npc0 commited on
Commit
181b7f6
β€’
1 Parent(s): d9257a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -35,7 +35,6 @@ init_history = [
35
 
36
  γ€ζθ­°δΊ”ε€‹ι©εˆηš„ε…¬εΌγ€‚'''),
37
  ]
38
- INIT_LEN = len(init_history)
39
 
40
  os.system("wget https://huggingface.co/npc0/chatglm3-6b-int4/resolve/main/chatglm3-ggml-q4_0.bin")
41
 
@@ -71,7 +70,7 @@ def predict(input, max_length, top_p, temperature, history):
71
  else:
72
  input = 'θ«‹η‚Ίγ€Ž%s』選取5個公式' %input
73
  response = ""
74
- history.append(chatglm_cpp.ChatMessage(role="user", content=input))
75
 
76
  generation_kwargs = dict(
77
  max_length=max_length,
 
35
 
36
  γ€ζθ­°δΊ”ε€‹ι©εˆηš„ε…¬εΌγ€‚'''),
37
  ]
 
38
 
39
  os.system("wget https://huggingface.co/npc0/chatglm3-6b-int4/resolve/main/chatglm3-ggml-q4_0.bin")
40
 
 
70
  else:
71
  input = 'θ«‹η‚Ίγ€Ž%s』選取5個公式' %input
72
  response = ""
73
+ history.append(myChatMessage(role="user", content=input))
74
 
75
  generation_kwargs = dict(
76
  max_length=max_length,