chansung commited on
Commit
5be700d
1 Parent(s): d0461f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -162,7 +162,11 @@ async def chat_stream(
162
  for ppm in local_data
163
  ]
164
 
165
- # prompt = build_prompts(ppm, global_context, ctx_num_lconv)
 
 
 
 
166
 
167
  #######
168
  # if internet_option:
@@ -180,14 +184,12 @@ async def chat_stream(
180
  }
181
 
182
  palm_if, response_txt = gen_text(
183
- instruction_txtbox, palm_if,
184
  parameters=parameters
185
  )
186
 
187
  ppm = res[idx]
188
- ppm.add_pingpong(
189
- PingPong(instruction_txtbox, response_txt)
190
- )
191
 
192
  return "", "", ppm.build_uis(), str(res), gr.update(interactive=True), "off"
193
 
 
162
  for ppm in local_data
163
  ]
164
 
165
+ ppm = res[idx]
166
+ ppm.add_pingpong(
167
+ PingPong(instruction_txtbox, response_txt)
168
+ )
169
+ prompt = build_prompts(ppm, global_context, ctx_num_lconv)
170
 
171
  #######
172
  # if internet_option:
 
184
  }
185
 
186
  palm_if, response_txt = gen_text(
187
+ prompt,
188
  parameters=parameters
189
  )
190
 
191
  ppm = res[idx]
192
+ ppm.replace_last_pong(response_txt)
 
 
193
 
194
  return "", "", ppm.build_uis(), str(res), gr.update(interactive=True), "off"
195