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