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