Spaces:
Running
Running
Update app.py
Browse files
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('
|
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=
|
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)
|