Johnson8187 commited on
Commit
6b75089
•
1 Parent(s): 8629a02

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -75,7 +75,7 @@ label_mapping = {
75
  7: "厭惡語調"
76
  }
77
 
78
- def predict_emotion(text, model_path="Johnson8187/Chinese-emotion-classifier"):
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-emotion-classifier"):
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) # 移動模型到設備