chansung commited on
Commit
203dbb7
β€’
1 Parent(s): cd898bc

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +2 -1
ui.py CHANGED
@@ -258,7 +258,8 @@ async def chat_stream(idx, local_data, user_prompt, chat_state, ctx_num_lconv=3)
258
  yield "", ppm.build_uis(), str(ppm), gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)
259
  except Exception as e:
260
  print(e)
261
- ppm.replace_pong("Gemini refused to answer. This happens becase there were some safety issues in the answer.")
 
262
  yield "", ppm.build_uis(), str(ppm), gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)
263
 
264
  def chat_reset(local_data, chat_state):
 
258
  yield "", ppm.build_uis(), str(ppm), gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)
259
  except Exception as e:
260
  print(e)
261
+ gr.Warning(str(e))
262
+ ppm.replace_last_pong("Gemini refused to answer. This happens becase there were some safety issues in the answer.")
263
  yield "", ppm.build_uis(), str(ppm), gr.update(interactive=True), gr.update(interactive=True), gr.update(interactive=True)
264
 
265
  def chat_reset(local_data, chat_state):