Johnson8187
commited on
Commit
•
cf1cfc8
1
Parent(s):
80330d3
Update README.md
Browse files
README.md
CHANGED
@@ -73,7 +73,7 @@ label_mapping = {
|
|
73 |
7: "åŽæƒ¡èªžèª¿"
|
74 |
}
|
75 |
|
76 |
-
def predict_emotion(text, model_path="Johnson8187/
|
77 |
# 載入模型和分詞器
|
78 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
79 |
model = AutoModelForSequenceClassification.from_pretrained(model_path).to(device) # 移動模型到è¨å‚™
|
@@ -141,7 +141,7 @@ label_mapping = {
|
|
141 |
7: "åŽæƒ¡èªžèª¿"
|
142 |
}
|
143 |
|
144 |
-
def predict_emotion(text, model_path="Johnson8187/
|
145 |
# 載入模型和分詞器
|
146 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
147 |
model = AutoModelForSequenceClassification.from_pretrained(model_path).to(device) # 移動模型到è¨å‚™
|
|
|
73 |
7: "åŽæƒ¡èªžèª¿"
|
74 |
}
|
75 |
|
76 |
+
def predict_emotion(text, model_path="Johnson8187/Chinese-emotion-classifier"):
|
77 |
# 載入模型和分詞器
|
78 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
79 |
model = AutoModelForSequenceClassification.from_pretrained(model_path).to(device) # 移動模型到è¨å‚™
|
|
|
141 |
7: "åŽæƒ¡èªžèª¿"
|
142 |
}
|
143 |
|
144 |
+
def predict_emotion(text, model_path="Johnson8187/Chinese-emotion-classifier"):
|
145 |
# 載入模型和分詞器
|
146 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
147 |
model = AutoModelForSequenceClassification.from_pretrained(model_path).to(device) # 移動模型到è¨å‚™
|