wannaphong commited on
Commit
b7b9574
·
1 Parent(s): c3ab01b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,7 +69,7 @@ class SensitiveTopic:
69
  adhoc_embeded_demonstrations: np.array = None # dimension = [N_ADHOC, DIM]. Please kindly note that this suppose to
70
 
71
 
72
- DEFAULT_SENSITIVITY = 0.7
73
 
74
 
75
  class SensitiveTopicProtector:
@@ -434,7 +434,7 @@ with gr.Blocks(height=900) as demo:
434
  else:
435
  x=sumbit_data(save="chat",prompt=_bot,vote=3,feedback=feedback,name_model=name_model+"-chat_old")
436
  return {feedback_chatbot_ok2: gr.update(visible=True),feedback_chatbot_box2: gr.update(visible=False)}
437
- msg2.submit(user2, [msg2, chatbot2], [msg2, chatbot2], queue=True).then(bot2, chatbot2, [chatbot2,feedback_chatbot_box2])
438
  feedback_chatbot_submit2.click(fn=save_up2, inputs=[chatbot2,chatbot_radio2,feedback_chatbot2], outputs=[feedback_chatbot_ok2,feedback_chatbot_box2], queue=False)
439
  clear2 = gr.Button("Clear")
440
  clear2.click(lambda: None, None, chatbot2, queue=False)
 
69
  adhoc_embeded_demonstrations: np.array = None # dimension = [N_ADHOC, DIM]. Please kindly note that this suppose to
70
 
71
 
72
+ DEFAULT_SENSITIVITY = 0.4
73
 
74
 
75
  class SensitiveTopicProtector:
 
434
  else:
435
  x=sumbit_data(save="chat",prompt=_bot,vote=3,feedback=feedback,name_model=name_model+"-chat_old")
436
  return {feedback_chatbot_ok2: gr.update(visible=True),feedback_chatbot_box2: gr.update(visible=False)}
437
+ msg2.submit(user2, [msg2, chatbot2], [msg2, chatbot2]).then(bot2, chatbot2, [chatbot2,feedback_chatbot_box2], queue=True)
438
  feedback_chatbot_submit2.click(fn=save_up2, inputs=[chatbot2,chatbot_radio2,feedback_chatbot2], outputs=[feedback_chatbot_ok2,feedback_chatbot_box2], queue=False)
439
  clear2 = gr.Button("Clear")
440
  clear2.click(lambda: None, None, chatbot2, queue=False)