Polarisailabs commited on
Commit
aeeff91
·
verified ·
1 Parent(s): e701ea0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,11 +26,11 @@ def reset_chat(chatbot,state):return None,[]
26
  with gr.Blocks(css='#col_container {width: 1000px; margin-left: auto; margin-right: auto;}\n #chatgpt {height: 400px; overflow: auto;}} ',theme=gr.themes.Default(primary_hue='slate'))as ModerationAI:
27
  with gr.Row():
28
  with gr.Column(scale=14):
29
- with gr.Group():
30
  with gr.Row():
31
  with gr.Column(scale=13):inputs=gr.Textbox(label='Type any abusive sentence ⤵️ Try : I will pi** on you')
32
  with gr.Column(scale=1):b1=gr.Button('Submit',elem_id='submit').style(full_width=_A);b2=gr.Button('Clear',elem_id='clear').style(full_width=_A)
33
  state_chatgpt=gr.State([])
34
- with gr.Group():
35
  with gr.Row():chatbot_chatgpt=gr.Chatbot(elem_id='chatgpt',label='Moderation AI')
36
  chat_counter_chatgpt=gr.Number(value=0,visible=False,precision=0);inputs.submit(reset_textbox,[],[inputs]);b1.click(predict_chatgpt,[inputs,chat_counter_chatgpt,chatbot_chatgpt,state_chatgpt],[chatbot_chatgpt,state_chatgpt]);b2.click(reset_chat,[chatbot_chatgpt,state_chatgpt],[chatbot_chatgpt,state_chatgpt]);ModerationAI.queue(concurrency_count=16).launch(height=2500,debug=_A)
 
26
  with gr.Blocks(css='#col_container {width: 1000px; margin-left: auto; margin-right: auto;}\n #chatgpt {height: 400px; overflow: auto;}} ',theme=gr.themes.Default(primary_hue='slate'))as ModerationAI:
27
  with gr.Row():
28
  with gr.Column(scale=14):
29
+ with gr.Box():
30
  with gr.Row():
31
  with gr.Column(scale=13):inputs=gr.Textbox(label='Type any abusive sentence ⤵️ Try : I will pi** on you')
32
  with gr.Column(scale=1):b1=gr.Button('Submit',elem_id='submit').style(full_width=_A);b2=gr.Button('Clear',elem_id='clear').style(full_width=_A)
33
  state_chatgpt=gr.State([])
34
+ with gr.Box():
35
  with gr.Row():chatbot_chatgpt=gr.Chatbot(elem_id='chatgpt',label='Moderation AI')
36
  chat_counter_chatgpt=gr.Number(value=0,visible=False,precision=0);inputs.submit(reset_textbox,[],[inputs]);b1.click(predict_chatgpt,[inputs,chat_counter_chatgpt,chatbot_chatgpt,state_chatgpt],[chatbot_chatgpt,state_chatgpt]);b2.click(reset_chat,[chatbot_chatgpt,state_chatgpt],[chatbot_chatgpt,state_chatgpt]);ModerationAI.queue(concurrency_count=16).launch(height=2500,debug=_A)