szzzzz commited on
Commit
835f641
·
verified ·
1 Parent(s): 514f18c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from toxic_detection import TextToxicDetector
4
  from toxic_detection import ImgToxicDetector
5
 
6
  text_model = TextToxicDetector()
7
- text_model.load('./text_detect_bert_16m.gz.tar')
8
  img_model = ImgToxicDetector()
9
  img_model.load('./toxic_detection_res50.gz.tar')
10
 
@@ -23,7 +23,7 @@ with gr.Blocks() as app:
23
  image_button_toxic = gr.Button("image_toxic")
24
  with gr.Tab("Toxic Text Detector"):
25
  text_input_toxic = gr.Textbox()
26
- text_output_toxic = gr.Label(num_top_classes=6)
27
  text_button_toxic = gr.Button("text_toxic")
28
 
29
  image_button_toxic.click(image_toxic_detect, inputs=image_input_toxic, outputs=image_output_toxic)
 
4
  from toxic_detection import ImgToxicDetector
5
 
6
  text_model = TextToxicDetector()
7
+ text_model.load('szzzzz/xlm-roberta-base-text-toxic')
8
  img_model = ImgToxicDetector()
9
  img_model.load('./toxic_detection_res50.gz.tar')
10
 
 
23
  image_button_toxic = gr.Button("image_toxic")
24
  with gr.Tab("Toxic Text Detector"):
25
  text_input_toxic = gr.Textbox()
26
+ text_output_toxic = gr.Label(num_top_classes=1)
27
  text_button_toxic = gr.Button("text_toxic")
28
 
29
  image_button_toxic.click(image_toxic_detect, inputs=image_input_toxic, outputs=image_output_toxic)