Spaces:
Sleeping
Sleeping
add app
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
python interactive.py
|
3 |
"""
|
4 |
import torch
|
5 |
-
from transformers import AutoTokenizer,
|
6 |
from transformers import TextClassificationPipeline
|
7 |
import gradio as gr
|
8 |
|
@@ -13,7 +13,7 @@ model_name_list = [
|
|
13 |
"momo/KcBERT-base_Hate_speech_Privacy_Detection",
|
14 |
]
|
15 |
|
16 |
-
model =
|
17 |
model_name,
|
18 |
num_labels=15,
|
19 |
)
|
|
|
2 |
python interactive.py
|
3 |
"""
|
4 |
import torch
|
5 |
+
from transformers import AutoTokenizer, BertForSequenceClassification
|
6 |
from transformers import TextClassificationPipeline
|
7 |
import gradio as gr
|
8 |
|
|
|
13 |
"momo/KcBERT-base_Hate_speech_Privacy_Detection",
|
14 |
]
|
15 |
|
16 |
+
model = BertForSequenceClassification.from_pretrained(
|
17 |
model_name,
|
18 |
num_labels=15,
|
19 |
)
|