Johnson8187 commited on
Commit
cf1cfc8
•
1 Parent(s): 80330d3

Update README.md

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