Spaces:
No application file
No application file
picard.tseng
commited on
Commit
·
050259a
1
Parent(s):
d319af5
First commit:
Browse filesdataset_handling.py: 處理資料集並上傳hugging face
traindata.py: 訓練BERT模型
updload.py: 上傳BERT模型
datasets: 資料集
- dataset_handlig.py +78 -0
- datasets/data_300.csv +301 -0
- datasets/data_300.json +300 -0
- datasets/intent_classification_100.csv +92 -0
- datasets/intent_classification_200.csv +201 -0
- requirements.txt +9 -0
- traindata.py +174 -0
- upload.py +16 -0
dataset_handlig.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ==============================
|
| 2 |
+
# 準備資料集
|
| 3 |
+
# ==============================
|
| 4 |
+
from datasets import Dataset, DatasetDict
|
| 5 |
+
from huggingface_hub import HfApi, HfFolder
|
| 6 |
+
import pandas as pd
|
| 7 |
+
import os
|
| 8 |
+
|
| 9 |
+
# ==============================
|
| 10 |
+
# 參數設定
|
| 11 |
+
# ==============================
|
| 12 |
+
csv_path = "./datasets/intent_classification_200.csv" # 你的CSV路徑
|
| 13 |
+
test_sample_size = 25 # 要分配多少筆到 test 集
|
| 14 |
+
repo_name = "picard47at/dataset1" # Hugging Face dataset repo 名稱
|
| 15 |
+
hf_token = os.environ["TOGETHER_API_KEY"]
|
| 16 |
+
# ==============================
|
| 17 |
+
# 讀取 CSV
|
| 18 |
+
# ==============================
|
| 19 |
+
df = pd.read_csv(csv_path)
|
| 20 |
+
|
| 21 |
+
# 確保只有 text 和 intent 欄位
|
| 22 |
+
df = df[['text', 'intent']]
|
| 23 |
+
|
| 24 |
+
# 總資料筆數
|
| 25 |
+
num_samples = len(df)
|
| 26 |
+
|
| 27 |
+
# ==============================
|
| 28 |
+
# 分成 train / test 並轉換成 DatasetDict
|
| 29 |
+
# ==============================
|
| 30 |
+
if num_samples <= test_sample_size:
|
| 31 |
+
# 不夠分配,全部放 train
|
| 32 |
+
dataset_dict = DatasetDict({
|
| 33 |
+
"train": Dataset.from_pandas(df)
|
| 34 |
+
})
|
| 35 |
+
print(f"資料筆數不足 {test_sample_size},全部 {num_samples} 筆作為訓練資料")
|
| 36 |
+
else:
|
| 37 |
+
# 隨機重排資料
|
| 38 |
+
df = df.sample(frac=1, random_state=42).reset_index(drop=True)
|
| 39 |
+
|
| 40 |
+
# 切分
|
| 41 |
+
test_df = df.iloc[:test_sample_size]
|
| 42 |
+
train_df = df.iloc[test_sample_size:]
|
| 43 |
+
|
| 44 |
+
# 建立 DatasetDict
|
| 45 |
+
dataset_dict = DatasetDict({
|
| 46 |
+
"train": Dataset.from_pandas(train_df),
|
| 47 |
+
"test": Dataset.from_pandas(test_df)
|
| 48 |
+
})
|
| 49 |
+
print(f"分配 {len(train_df)} 筆到 train,{len(test_df)} 筆到 test")
|
| 50 |
+
|
| 51 |
+
# 登入 Hugging Face
|
| 52 |
+
HfFolder.save_token(hf_token)
|
| 53 |
+
|
| 54 |
+
# 7. 上傳到 Hugging Face Datasets
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
api = HfApi()
|
| 58 |
+
|
| 59 |
+
# 建立新的 dataset repo(如果還沒建)
|
| 60 |
+
api.create_repo(repo_name, repo_type="dataset", exist_ok=True)
|
| 61 |
+
'''
|
| 62 |
+
# 上傳資料夾
|
| 63 |
+
api.upload_folder(
|
| 64 |
+
folder_path=output_dir,
|
| 65 |
+
path_in_repo=".",
|
| 66 |
+
repo_id=repo_name,
|
| 67 |
+
repo_type="dataset"
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
'''
|
| 71 |
+
# ==============================
|
| 72 |
+
# 上傳到 Hugging Face Hub (push_to_hub)
|
| 73 |
+
# ==============================
|
| 74 |
+
|
| 75 |
+
# push_to_hub 直接上傳 DatasetDict
|
| 76 |
+
dataset_dict.push_to_hub(repo_name)
|
| 77 |
+
print(f"資料集上傳完成:https://huggingface.co/datasets/{repo_name}")
|
| 78 |
+
dataset_dict.save_to_disk("./")
|
datasets/data_300.csv
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text,intent
|
| 2 |
+
今天天氣如何,weather
|
| 3 |
+
今天有什麼新聞,news
|
| 4 |
+
最近有什麼大事,news
|
| 5 |
+
今天會下雨嗎,weather
|
| 6 |
+
台幣對港幣多少,forex
|
| 7 |
+
來點輕音樂,music
|
| 8 |
+
今天會下雨嗎,weather
|
| 9 |
+
幫我找科技新聞,news
|
| 10 |
+
我要聽周杰倫,music
|
| 11 |
+
放首流行歌,music
|
| 12 |
+
給我個有趣的,joke
|
| 13 |
+
人民幣匯率,forex
|
| 14 |
+
今天天氣如何,weather
|
| 15 |
+
今天日圓多少,forex
|
| 16 |
+
今天天氣如何,weather
|
| 17 |
+
播放音樂,music
|
| 18 |
+
幫我查一下氣象,weather
|
| 19 |
+
我要聽周杰倫,music
|
| 20 |
+
今天日圓多少,forex
|
| 21 |
+
放首我喜歡的歌,music
|
| 22 |
+
政治新聞快報,news
|
| 23 |
+
今天日圓多少,forex
|
| 24 |
+
今天天氣如何,weather
|
| 25 |
+
播放音樂,music
|
| 26 |
+
告訴我高雄的天氣,weather
|
| 27 |
+
今天日圓多少,forex
|
| 28 |
+
幫我找科技新聞,news
|
| 29 |
+
來點輕音樂,music
|
| 30 |
+
逗我笑一下,joke
|
| 31 |
+
台幣對港幣多少,forex
|
| 32 |
+
幫我找科技新聞,news
|
| 33 |
+
幫我找科技新聞,news
|
| 34 |
+
財經消息,news
|
| 35 |
+
幫我查一下氣象,weather
|
| 36 |
+
告訴我高雄的天氣,weather
|
| 37 |
+
最近有什麼大事,news
|
| 38 |
+
今天有什麼新聞,news
|
| 39 |
+
幫我查一下氣象,weather
|
| 40 |
+
來個冷笑話,joke
|
| 41 |
+
人民幣匯率,forex
|
| 42 |
+
政治新聞快報,news
|
| 43 |
+
來點輕音樂,music
|
| 44 |
+
幫我查一下氣象,weather
|
| 45 |
+
今天日圓多少,forex
|
| 46 |
+
來點輕音樂,music
|
| 47 |
+
播放音樂,music
|
| 48 |
+
今天有什麼新聞,news
|
| 49 |
+
查一下美元匯率,forex
|
| 50 |
+
我要聽周杰倫,music
|
| 51 |
+
今天天氣如何,weather
|
| 52 |
+
人民幣匯率,forex
|
| 53 |
+
財經消息,news
|
| 54 |
+
今天天氣如何,weather
|
| 55 |
+
我要聽周杰倫,music
|
| 56 |
+
財經消息,news
|
| 57 |
+
隨便來個笑話,joke
|
| 58 |
+
今天會下雨嗎,weather
|
| 59 |
+
台北現在幾度,weather
|
| 60 |
+
最近有什麼大事,news
|
| 61 |
+
幫我找科技新聞,news
|
| 62 |
+
放首我喜歡的歌,music
|
| 63 |
+
我要聽周杰倫,music
|
| 64 |
+
幫我找科技新聞,news
|
| 65 |
+
逗我笑一下,joke
|
| 66 |
+
今天日圓多少,forex
|
| 67 |
+
幫我找科技新聞,news
|
| 68 |
+
我要聽周杰倫,music
|
| 69 |
+
今天日圓多少,forex
|
| 70 |
+
今天會下雨嗎,weather
|
| 71 |
+
台北現在幾度,weather
|
| 72 |
+
政治新聞快報,news
|
| 73 |
+
來個冷笑話,joke
|
| 74 |
+
台幣對港幣多少,forex
|
| 75 |
+
今天日圓多少,forex
|
| 76 |
+
人民幣匯率,forex
|
| 77 |
+
今天會下雨嗎,weather
|
| 78 |
+
我要聽周杰倫,music
|
| 79 |
+
台北現在幾度,weather
|
| 80 |
+
告訴我高雄的天氣,weather
|
| 81 |
+
幫我找科技新聞,news
|
| 82 |
+
今天日圓多少,forex
|
| 83 |
+
幫我查一下氣象,weather
|
| 84 |
+
逗我笑一下,joke
|
| 85 |
+
今天有什麼新聞,news
|
| 86 |
+
隨便來個笑話,joke
|
| 87 |
+
給我個有趣的,joke
|
| 88 |
+
政治新聞快報,news
|
| 89 |
+
逗我笑一下,joke
|
| 90 |
+
今天有什麼新聞,news
|
| 91 |
+
放首我喜歡的歌,music
|
| 92 |
+
台幣對港幣多少,forex
|
| 93 |
+
給我個有趣的,joke
|
| 94 |
+
放首流行歌,music
|
| 95 |
+
今天會下雨嗎,weather
|
| 96 |
+
放首我喜歡的歌,music
|
| 97 |
+
給我個有趣的,joke
|
| 98 |
+
今天天氣如何,weather
|
| 99 |
+
隨便來個笑話,joke
|
| 100 |
+
告訴我高雄的天氣,weather
|
| 101 |
+
財經消息,news
|
| 102 |
+
來點輕音樂,music
|
| 103 |
+
逗我笑一下,joke
|
| 104 |
+
逗我笑一下,joke
|
| 105 |
+
來點輕音樂,music
|
| 106 |
+
今天日圓多少,forex
|
| 107 |
+
告訴我高雄的天氣,weather
|
| 108 |
+
政治新聞快報,news
|
| 109 |
+
查一下美元匯率,forex
|
| 110 |
+
人民幣匯率,forex
|
| 111 |
+
幫我查一下氣象,weather
|
| 112 |
+
財經消息,news
|
| 113 |
+
播放音樂,music
|
| 114 |
+
給我個有趣的,joke
|
| 115 |
+
來個冷笑話,joke
|
| 116 |
+
財經消息,news
|
| 117 |
+
我要聽周杰倫,music
|
| 118 |
+
台北現在幾度,weather
|
| 119 |
+
隨便來個笑話,joke
|
| 120 |
+
今天有什麼新聞,news
|
| 121 |
+
隨便來個笑話,joke
|
| 122 |
+
說個笑話,joke
|
| 123 |
+
政治新聞快報,news
|
| 124 |
+
台幣對港幣多少,forex
|
| 125 |
+
台北現在幾度,weather
|
| 126 |
+
台幣對港幣多少,forex
|
| 127 |
+
來點輕音樂,music
|
| 128 |
+
來個冷笑話,joke
|
| 129 |
+
政治新聞快報,news
|
| 130 |
+
放首流行歌,music
|
| 131 |
+
我要聽周杰倫,music
|
| 132 |
+
隨便來個笑話,joke
|
| 133 |
+
放首流行歌,music
|
| 134 |
+
逗我笑一下,joke
|
| 135 |
+
說個笑話,joke
|
| 136 |
+
台幣對港幣多少,forex
|
| 137 |
+
幫我找科技新聞,news
|
| 138 |
+
給我個有趣的,joke
|
| 139 |
+
政治新聞快報,news
|
| 140 |
+
財經消息,news
|
| 141 |
+
今天日圓多少,forex
|
| 142 |
+
台幣對港幣多少,forex
|
| 143 |
+
幫我找科技新聞,news
|
| 144 |
+
播放音樂,music
|
| 145 |
+
告訴我高雄的天氣,weather
|
| 146 |
+
放首我喜歡的歌,music
|
| 147 |
+
幫我查一下氣象,weather
|
| 148 |
+
人民幣匯率,forex
|
| 149 |
+
逗我笑一下,joke
|
| 150 |
+
逗我笑一下,joke
|
| 151 |
+
政治新聞快報,news
|
| 152 |
+
查一下美元匯率,forex
|
| 153 |
+
我要聽周杰倫,music
|
| 154 |
+
今天日圓多少,forex
|
| 155 |
+
幫我找科技新聞,news
|
| 156 |
+
美金對台幣,forex
|
| 157 |
+
查一下美元匯率,forex
|
| 158 |
+
今天天氣如何,weather
|
| 159 |
+
幫我找科技新聞,news
|
| 160 |
+
台幣對港幣多少,forex
|
| 161 |
+
今天天氣如何,weather
|
| 162 |
+
幫我找科技新聞,news
|
| 163 |
+
最近有什麼大事,news
|
| 164 |
+
給我個有趣的,joke
|
| 165 |
+
美金對台幣,forex
|
| 166 |
+
美金對台幣,forex
|
| 167 |
+
給我個有趣的,joke
|
| 168 |
+
人民幣匯率,forex
|
| 169 |
+
播放音樂,music
|
| 170 |
+
放首流行歌,music
|
| 171 |
+
美金對台幣,forex
|
| 172 |
+
來個冷笑話,joke
|
| 173 |
+
台幣對港幣多少,forex
|
| 174 |
+
今天有什麼新聞,news
|
| 175 |
+
給我個有趣的,joke
|
| 176 |
+
今天天氣如何,weather
|
| 177 |
+
隨便來個笑話,joke
|
| 178 |
+
最近有什麼大事,news
|
| 179 |
+
今天有什麼新聞,news
|
| 180 |
+
今天日圓多少,forex
|
| 181 |
+
幫我找科技新聞,news
|
| 182 |
+
最近有什麼大事,news
|
| 183 |
+
今天日圓多少,forex
|
| 184 |
+
查一下美元匯率,forex
|
| 185 |
+
告訴我高雄的天氣,weather
|
| 186 |
+
美金對台幣,forex
|
| 187 |
+
播放音樂,music
|
| 188 |
+
放首流行歌,music
|
| 189 |
+
告訴我高雄的天氣,weather
|
| 190 |
+
今天天氣如何,weather
|
| 191 |
+
幫我找科技新聞,news
|
| 192 |
+
今天會下雨嗎,weather
|
| 193 |
+
台幣對港幣多少,forex
|
| 194 |
+
今天會下雨嗎,weather
|
| 195 |
+
今天會下雨嗎,weather
|
| 196 |
+
最近有什麼大事,news
|
| 197 |
+
財���消息,news
|
| 198 |
+
今天日圓多少,forex
|
| 199 |
+
來點輕音樂,music
|
| 200 |
+
美金對台幣,forex
|
| 201 |
+
財經消息,news
|
| 202 |
+
來點輕音樂,music
|
| 203 |
+
幫我查一下氣象,weather
|
| 204 |
+
人民幣匯率,forex
|
| 205 |
+
台北現在幾度,weather
|
| 206 |
+
財經消息,news
|
| 207 |
+
美金對台幣,forex
|
| 208 |
+
台北現在幾度,weather
|
| 209 |
+
幫我查一下氣象,weather
|
| 210 |
+
財經消息,news
|
| 211 |
+
說個笑話,joke
|
| 212 |
+
今天日圓多少,forex
|
| 213 |
+
今天會下雨嗎,weather
|
| 214 |
+
幫我查一下氣象,weather
|
| 215 |
+
播放音樂,music
|
| 216 |
+
放首流行歌,music
|
| 217 |
+
美金對台幣,forex
|
| 218 |
+
幫我找科技新聞,news
|
| 219 |
+
財經消息,news
|
| 220 |
+
查一下美元匯率,forex
|
| 221 |
+
幫我找科技新聞,news
|
| 222 |
+
說個笑話,joke
|
| 223 |
+
台幣對港幣多少,forex
|
| 224 |
+
給我個有趣的,joke
|
| 225 |
+
幫我查一下氣象,weather
|
| 226 |
+
台幣對港幣多少,forex
|
| 227 |
+
幫我找科技新聞,news
|
| 228 |
+
給我個有趣的,joke
|
| 229 |
+
今天有什麼新聞,news
|
| 230 |
+
說個笑話,joke
|
| 231 |
+
台北現在幾度,weather
|
| 232 |
+
今天天氣如何,weather
|
| 233 |
+
放首我喜歡的歌,music
|
| 234 |
+
告訴我高雄的天氣,weather
|
| 235 |
+
今天會下雨嗎,weather
|
| 236 |
+
放首流行歌,music
|
| 237 |
+
說個笑話,joke
|
| 238 |
+
人民幣匯率,forex
|
| 239 |
+
台北現在幾度,weather
|
| 240 |
+
我要聽周杰倫,music
|
| 241 |
+
放首我喜歡的歌,music
|
| 242 |
+
今天日圓多少,forex
|
| 243 |
+
財經消息,news
|
| 244 |
+
台幣對港幣多少,forex
|
| 245 |
+
幫我找科技新聞,news
|
| 246 |
+
給我個有趣的,joke
|
| 247 |
+
放首我喜歡的歌,music
|
| 248 |
+
今天日圓多少,forex
|
| 249 |
+
今天日圓多少,forex
|
| 250 |
+
最近有什麼大事,news
|
| 251 |
+
說個笑話,joke
|
| 252 |
+
隨便來個笑話,joke
|
| 253 |
+
查一下美元匯率,forex
|
| 254 |
+
台幣對港幣多少,forex
|
| 255 |
+
幫我找科技新聞,news
|
| 256 |
+
美金對台幣,forex
|
| 257 |
+
美金對台幣,forex
|
| 258 |
+
財經消息,news
|
| 259 |
+
今天有什麼新聞,news
|
| 260 |
+
政治新聞快報,news
|
| 261 |
+
告訴我高雄的天氣,weather
|
| 262 |
+
財經消息,news
|
| 263 |
+
今天日圓多少,forex
|
| 264 |
+
放首流行歌,music
|
| 265 |
+
放首我喜歡的歌,music
|
| 266 |
+
放首我喜歡的歌,music
|
| 267 |
+
我要聽周杰倫,music
|
| 268 |
+
今天天氣如何,weather
|
| 269 |
+
幫我找科技新聞,news
|
| 270 |
+
今天天氣如何,weather
|
| 271 |
+
台北現在幾度,weather
|
| 272 |
+
幫我查一下氣象,weather
|
| 273 |
+
人民幣匯率,forex
|
| 274 |
+
今天會下雨嗎,weather
|
| 275 |
+
今天有什麼新聞,news
|
| 276 |
+
播放音樂,music
|
| 277 |
+
告訴我高雄的天氣,weather
|
| 278 |
+
來點輕音樂,music
|
| 279 |
+
今天有什麼新聞,news
|
| 280 |
+
今天日圓多少,forex
|
| 281 |
+
播放音樂,music
|
| 282 |
+
台北現在幾度,weather
|
| 283 |
+
放首我喜歡的歌,music
|
| 284 |
+
財經消息,news
|
| 285 |
+
最近有什麼大事,news
|
| 286 |
+
告訴我高雄的天氣,weather
|
| 287 |
+
逗我笑一下,joke
|
| 288 |
+
來個冷笑話,joke
|
| 289 |
+
查一下美元匯率,forex
|
| 290 |
+
幫我找科技新聞,news
|
| 291 |
+
隨便來個笑話,joke
|
| 292 |
+
播放音樂,music
|
| 293 |
+
今天日圓多少,forex
|
| 294 |
+
台幣對港幣多少,forex
|
| 295 |
+
播放音樂,music
|
| 296 |
+
台幣對港幣多少,forex
|
| 297 |
+
播放音樂,music
|
| 298 |
+
今天有什麼新聞,news
|
| 299 |
+
今天天氣如何,weather
|
| 300 |
+
人民幣匯率,forex
|
| 301 |
+
今天有什麼新聞,news
|
datasets/data_300.json
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 2 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 3 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 4 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 5 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 6 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 7 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 8 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 9 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 10 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 11 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 12 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 13 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 14 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 15 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 16 |
+
{"text": "播放音樂", "intent": "music"}
|
| 17 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 18 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 19 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 20 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 21 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 22 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 23 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 24 |
+
{"text": "播放音樂", "intent": "music"}
|
| 25 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 26 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 27 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 28 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 29 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 30 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 31 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 32 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 33 |
+
{"text": "財經消息", "intent": "news"}
|
| 34 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 35 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 36 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 37 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 38 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 39 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 40 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 41 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 42 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 43 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 44 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 45 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 46 |
+
{"text": "播放音樂", "intent": "music"}
|
| 47 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 48 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 49 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 50 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 51 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 52 |
+
{"text": "財經消息", "intent": "news"}
|
| 53 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 54 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 55 |
+
{"text": "財經消息", "intent": "news"}
|
| 56 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 57 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 58 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 59 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 60 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 61 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 62 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 63 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 64 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 65 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 66 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 67 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 68 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 69 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 70 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 71 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 72 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 73 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 74 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 75 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 76 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 77 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 78 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 79 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 80 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 81 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 82 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 83 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 84 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 85 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 86 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 87 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 88 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 89 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 90 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 91 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 92 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 93 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 94 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 95 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 96 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 97 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 98 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 99 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 100 |
+
{"text": "財經消息", "intent": "news"}
|
| 101 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 102 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 103 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 104 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 105 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 106 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 107 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 108 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 109 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 110 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 111 |
+
{"text": "財經消息", "intent": "news"}
|
| 112 |
+
{"text": "播放音樂", "intent": "music"}
|
| 113 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 114 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 115 |
+
{"text": "財經消息", "intent": "news"}
|
| 116 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 117 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 118 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 119 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 120 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 121 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 122 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 123 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 124 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 125 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 126 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 127 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 128 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 129 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 130 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 131 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 132 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 133 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 134 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 135 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 136 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 137 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 138 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 139 |
+
{"text": "財經消息", "intent": "news"}
|
| 140 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 141 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 142 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 143 |
+
{"text": "播放音樂", "intent": "music"}
|
| 144 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 145 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 146 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 147 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 148 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 149 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 150 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 151 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 152 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 153 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 154 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 155 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 156 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 157 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 158 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 159 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 160 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 161 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 162 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 163 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 164 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 165 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 166 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 167 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 168 |
+
{"text": "播放音樂", "intent": "music"}
|
| 169 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 170 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 171 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 172 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 173 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 174 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 175 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 176 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 177 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 178 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 179 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 180 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 181 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 182 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 183 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 184 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 185 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 186 |
+
{"text": "播放音樂", "intent": "music"}
|
| 187 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 188 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 189 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 190 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 191 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 192 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 193 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 194 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 195 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 196 |
+
{"text": "財經消息", "intent": "news"}
|
| 197 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 198 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 199 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 200 |
+
{"text": "財經消息", "intent": "news"}
|
| 201 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 202 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 203 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 204 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 205 |
+
{"text": "財經消息", "intent": "news"}
|
| 206 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 207 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 208 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 209 |
+
{"text": "財經消息", "intent": "news"}
|
| 210 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 211 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 212 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 213 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 214 |
+
{"text": "播放音樂", "intent": "music"}
|
| 215 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 216 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 217 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 218 |
+
{"text": "財經消息", "intent": "news"}
|
| 219 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 220 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 221 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 222 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 223 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 224 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 225 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 226 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 227 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 228 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 229 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 230 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 231 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 232 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 233 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 234 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 235 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 236 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 237 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 238 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 239 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 240 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 241 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 242 |
+
{"text": "財經消息", "intent": "news"}
|
| 243 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 244 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 245 |
+
{"text": "給我個有趣的", "intent": "joke"}
|
| 246 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 247 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 248 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 249 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 250 |
+
{"text": "說個笑話", "intent": "joke"}
|
| 251 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 252 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 253 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 254 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 255 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 256 |
+
{"text": "美金對台幣", "intent": "forex"}
|
| 257 |
+
{"text": "財經消息", "intent": "news"}
|
| 258 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 259 |
+
{"text": "政治新聞快報", "intent": "news"}
|
| 260 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 261 |
+
{"text": "財經消息", "intent": "news"}
|
| 262 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 263 |
+
{"text": "放首流行歌", "intent": "music"}
|
| 264 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 265 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 266 |
+
{"text": "我要聽周杰倫", "intent": "music"}
|
| 267 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 268 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 269 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 270 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 271 |
+
{"text": "幫我查一下氣象", "intent": "weather"}
|
| 272 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 273 |
+
{"text": "今天會下雨嗎", "intent": "weather"}
|
| 274 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 275 |
+
{"text": "播放音樂", "intent": "music"}
|
| 276 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 277 |
+
{"text": "來點輕音樂", "intent": "music"}
|
| 278 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 279 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 280 |
+
{"text": "播放音樂", "intent": "music"}
|
| 281 |
+
{"text": "台北現在幾度", "intent": "weather"}
|
| 282 |
+
{"text": "放首我喜歡的歌", "intent": "music"}
|
| 283 |
+
{"text": "財經消息", "intent": "news"}
|
| 284 |
+
{"text": "最近有什麼大事", "intent": "news"}
|
| 285 |
+
{"text": "告訴我高雄的天氣", "intent": "weather"}
|
| 286 |
+
{"text": "逗我笑一下", "intent": "joke"}
|
| 287 |
+
{"text": "來個冷笑話", "intent": "joke"}
|
| 288 |
+
{"text": "查一下美元匯率", "intent": "forex"}
|
| 289 |
+
{"text": "幫我找科技新聞", "intent": "news"}
|
| 290 |
+
{"text": "隨便來個笑話", "intent": "joke"}
|
| 291 |
+
{"text": "播放音樂", "intent": "music"}
|
| 292 |
+
{"text": "今天日圓多少", "intent": "forex"}
|
| 293 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 294 |
+
{"text": "播放音樂", "intent": "music"}
|
| 295 |
+
{"text": "台幣對港幣多少", "intent": "forex"}
|
| 296 |
+
{"text": "播放音樂", "intent": "music"}
|
| 297 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
| 298 |
+
{"text": "今天天氣如何", "intent": "weather"}
|
| 299 |
+
{"text": "人民幣匯率", "intent": "forex"}
|
| 300 |
+
{"text": "今天有什麼新聞", "intent": "news"}
|
datasets/intent_classification_100.csv
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text,intent
|
| 2 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 3 |
+
請問你們有提供素食餐點嗎?,Others
|
| 4 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 5 |
+
兩杯冰拿鐵,不加糖,Others
|
| 6 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 7 |
+
你們有賣蛋糕嗎?,Others
|
| 8 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 9 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 10 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 11 |
+
可以外送到辦公室嗎?,Others
|
| 12 |
+
我想預約今晚九點,三位,Reservation
|
| 13 |
+
幫我送到台北車站,Others
|
| 14 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 15 |
+
請問今天有什麼優惠?,Others
|
| 16 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 17 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 18 |
+
這禮拜六中午十二點,三人,Reservation
|
| 19 |
+
幫我叫計程車,Others
|
| 20 |
+
今天晚上九點,四個位子,Reservation
|
| 21 |
+
我要三杯珍珠奶茶,Others
|
| 22 |
+
我要訂位,明天七點,兩個人,Reservation
|
| 23 |
+
請幫我外帶兩份便當,Others
|
| 24 |
+
明天下午三點半,五位,包廂,Reservation
|
| 25 |
+
送到松江路五十號,Others
|
| 26 |
+
後天晚上七點,四人,Reservation
|
| 27 |
+
我要三碗牛肉麵,Others
|
| 28 |
+
今天下午五點有空位嗎?兩人,Reservation
|
| 29 |
+
幫我取消今晚的外送訂單,Others
|
| 30 |
+
下星期三晚上八點,三個人,Reservation
|
| 31 |
+
我要一份雞排加大薯,Others
|
| 32 |
+
預訂明天中午十二點半,六位,Reservation
|
| 33 |
+
我可以用Line Pay付嗎?,Others
|
| 34 |
+
今天晚上七點半,有三人桌嗎?,Reservation
|
| 35 |
+
幫我訂一張四人桌,今晚八點,Reservation
|
| 36 |
+
我要買兩杯冰沙,Others
|
| 37 |
+
星期天晚上六點,五位,靠窗,Reservation
|
| 38 |
+
請問有無障礙設施嗎?,Others
|
| 39 |
+
明天七點,兩人位子,Reservation
|
| 40 |
+
我要三份炸雞,Others
|
| 41 |
+
這禮拜五晚上九點,四個人,Reservation
|
| 42 |
+
外送到忠孝東路口,Others
|
| 43 |
+
預訂星期六中午十二點,兩人,Reservation
|
| 44 |
+
我要取消剛才的訂單,Others
|
| 45 |
+
今晚八點,五人桌,Reservation
|
| 46 |
+
我要一杯熱奶茶,Others
|
| 47 |
+
明天晚上六點半,四位,Reservation
|
| 48 |
+
今天下午有牛排嗎?,Others
|
| 49 |
+
訂位,明天晚上八點,兩位,Reservation
|
| 50 |
+
幫我外送一份便當,Others
|
| 51 |
+
今天晚上七點,兩人位子,Reservation
|
| 52 |
+
我要五杯冰紅茶,Others
|
| 53 |
+
星期天中午十二點,訂四個位子,Reservation
|
| 54 |
+
請問有停車位嗎?,Others
|
| 55 |
+
後天下午三點半,訂三人位,Reservation
|
| 56 |
+
我要兩個雞腿便當,Others
|
| 57 |
+
今天晚上八點半,有兩位的座位嗎?,Reservation
|
| 58 |
+
請問你們營業到幾點?,Others
|
| 59 |
+
我要預約禮拜六中午十一點,三人,Reservation
|
| 60 |
+
幫我送到台北101,Others
|
| 61 |
+
今晚七點半,兩位,靠窗,Reservation
|
| 62 |
+
我要兩杯熱奶茶,不加糖,Others
|
| 63 |
+
後天晚上七點,訂三人位,Reservation
|
| 64 |
+
我要一份炒飯,外帶,Others
|
| 65 |
+
星期五晚上八點,四位,要靠窗,Reservation
|
| 66 |
+
我想問今天有什麼湯品?,Others
|
| 67 |
+
今天晚上九點,五人位子,Reservation
|
| 68 |
+
我要兩杯冬瓜檸檬,Others
|
| 69 |
+
後天中午十二點半,兩位,Reservation
|
| 70 |
+
請幫我外送到南港車站,Others
|
| 71 |
+
明天晚上六點,三人,靠窗,Reservation
|
| 72 |
+
我要三杯奶茶,Others
|
| 73 |
+
今天晚上八點,有兩位位子嗎?,Reservation
|
| 74 |
+
我要一份雞排,一杯可樂,Others
|
| 75 |
+
明天中午十二點,四位,靠窗,Reservation
|
| 76 |
+
我要訂購一份蛋糕,Others
|
| 77 |
+
今天晚上七點半,兩個位子,Reservation
|
| 78 |
+
幫我買兩杯手搖飲,Others
|
| 79 |
+
星期五晚上九點,三人,Reservation
|
| 80 |
+
我要兩份排骨便當,Others
|
| 81 |
+
明天下午五點,五人,靠窗,Reservation
|
| 82 |
+
我要三杯冰綠茶,Others
|
| 83 |
+
星期天晚上六點半,三位,Reservation
|
| 84 |
+
我想預定兩份炸物拼盤,Others
|
| 85 |
+
今晚七點,訂兩個位子,Reservation
|
| 86 |
+
我要一杯冰奶茶,Others
|
| 87 |
+
後天下午三點,三人位,Reservation
|
| 88 |
+
幫我點兩杯紅茶,Others
|
| 89 |
+
今天晚上六點半,四位,Reservation
|
| 90 |
+
我要外帶兩份義大利麵,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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
text,intent
|
| 2 |
+
幫我送到捷運站出口,Others
|
| 3 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 4 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 5 |
+
我要點一杯熱美式,Others
|
| 6 |
+
今晚九點,訂兩位位子,Reservation
|
| 7 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 8 |
+
後天晚上六點半,兩位位子,Reservation
|
| 9 |
+
我要兩份鹽酥雞,Others
|
| 10 |
+
預約今晚七點,兩人桌,Reservation
|
| 11 |
+
幫我叫計程車,Others
|
| 12 |
+
下星期五晚上八點,四個人,Reservation
|
| 13 |
+
下星期五晚上八點,四個人,Reservation
|
| 14 |
+
這禮拜六中午十二點,三人,Reservation
|
| 15 |
+
星期五晚上七點半,六個人,Reservation
|
| 16 |
+
我要點一杯熱美式,Others
|
| 17 |
+
兩杯冰拿鐵,不加糖,Others
|
| 18 |
+
我想預約今晚九點,三位,Reservation
|
| 19 |
+
預約今晚七點,兩人桌,Reservation
|
| 20 |
+
後天下午五點,兩位,靠窗,Reservation
|
| 21 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 22 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 23 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 24 |
+
幫我外帶兩份豬排飯,Others
|
| 25 |
+
我要三份雞腿便當,Others
|
| 26 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 27 |
+
我想預約今晚九點,三位,Reservation
|
| 28 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 29 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 30 |
+
請問你們幾點打烊?,Others
|
| 31 |
+
請問附近有停車場嗎?,Others
|
| 32 |
+
我要點一杯熱美式,Others
|
| 33 |
+
幫我送到捷運站出口,Others
|
| 34 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 35 |
+
我想訂今晚六點半,三個人位子,Reservation
|
| 36 |
+
請問今天有什麼優惠?,Others
|
| 37 |
+
這禮拜六中午十二點,三人,Reservation
|
| 38 |
+
幫我送到捷運站出口,Others
|
| 39 |
+
我要三份雞腿便當,Others
|
| 40 |
+
請問有免費Wi-Fi嗎?,Others
|
| 41 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 42 |
+
幫我外帶兩份豬排飯,Others
|
| 43 |
+
兩杯冰拿鐵,不加糖,Others
|
| 44 |
+
後天下午五點,兩位,靠窗,Reservation
|
| 45 |
+
請問有免費Wi-Fi嗎?,Others
|
| 46 |
+
幫我叫計程車,Others
|
| 47 |
+
我要兩份鹽酥雞,Others
|
| 48 |
+
後天下午五點,兩位,靠窗,Reservation
|
| 49 |
+
請問你們幾點打烊?,Others
|
| 50 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 51 |
+
請問今天有什麼優惠?,Others
|
| 52 |
+
明天晚上七點,三人,靠窗,Reservation
|
| 53 |
+
今晚九點,訂兩位位子,Reservation
|
| 54 |
+
請問有免費Wi-Fi嗎?,Others
|
| 55 |
+
幫我叫計程車,Others
|
| 56 |
+
禮拜天中午十二點半,四個人,Reservation
|
| 57 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 58 |
+
請問你們有提供素食餐點嗎?,Others
|
| 59 |
+
我想預約今晚九點,三位,Reservation
|
| 60 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 61 |
+
我要三杯抹茶拿鐵,Others
|
| 62 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 63 |
+
後天晚上六點半,兩位位子,Reservation
|
| 64 |
+
今天有牛排套餐嗎?,Others
|
| 65 |
+
禮拜天中午十二點半,四個人,Reservation
|
| 66 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 67 |
+
請問你們有提供素食餐點嗎?,Others
|
| 68 |
+
星期五晚上七點半,六個人,Reservation
|
| 69 |
+
我要三杯抹茶拿鐵,Others
|
| 70 |
+
星期五晚上七點半,六個人,Reservation
|
| 71 |
+
我要點一杯熱美式,Others
|
| 72 |
+
幫我送到台北車站,Others
|
| 73 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 74 |
+
我要三杯珍珠奶茶,Others
|
| 75 |
+
下星期五晚上八點,四個人,Reservation
|
| 76 |
+
幫我外帶兩份豬排飯,Others
|
| 77 |
+
請問有免費Wi-Fi嗎?,Others
|
| 78 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 79 |
+
預約今晚七點,兩人桌,Reservation
|
| 80 |
+
星期六下午三點,五個位子,Reservation
|
| 81 |
+
請問你們有提供素食餐點嗎?,Others
|
| 82 |
+
星期六下午三點,五個位子,Reservation
|
| 83 |
+
你們有賣蛋糕嗎?,Others
|
| 84 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 85 |
+
請問你們有提供素食餐點嗎?,Others
|
| 86 |
+
幫我送到台北車站,Others
|
| 87 |
+
我要三杯珍珠奶茶,Others
|
| 88 |
+
明天晚上七點,三人,靠窗,Reservation
|
| 89 |
+
我要三杯珍珠奶茶,Others
|
| 90 |
+
今天晚上九點,四個位子,Reservation
|
| 91 |
+
我想訂今晚六點半,三個人位子,Reservation
|
| 92 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 93 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 94 |
+
星期五晚上七點半,六個人,Reservation
|
| 95 |
+
今天晚上九點,四個位子,Reservation
|
| 96 |
+
幫我送到捷運站出口,Others
|
| 97 |
+
我要三杯抹茶拿鐵,Others
|
| 98 |
+
請問附近有停車場嗎?,Others
|
| 99 |
+
我要三杯抹茶拿鐵,Others
|
| 100 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 101 |
+
預約今晚七點,兩人桌,Reservation
|
| 102 |
+
請問你們幾點打烊?,Others
|
| 103 |
+
星期六下午三點,五個位子,Reservation
|
| 104 |
+
明天晚上七點,三人,靠窗,Reservation
|
| 105 |
+
我想訂今晚六點半,三個人位子,Reservation
|
| 106 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 107 |
+
我要三杯珍珠奶茶,Others
|
| 108 |
+
幫我叫計程車,Others
|
| 109 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 110 |
+
後天晚上六點半,兩位位子,Reservation
|
| 111 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 112 |
+
幫我送到捷運站出口,Others
|
| 113 |
+
你們有賣蛋糕嗎?,Others
|
| 114 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 115 |
+
你們有賣蛋糕嗎?,Others
|
| 116 |
+
後天晚上六點半,兩位位子,Reservation
|
| 117 |
+
我要三份雞腿便當,Others
|
| 118 |
+
請問你們幾點打烊?,Others
|
| 119 |
+
我要點一杯熱美式,Others
|
| 120 |
+
我要兩份牛肉麵,一碗小菜,Others
|
| 121 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 122 |
+
兩杯冰拿鐵,不加糖,Others
|
| 123 |
+
星期六下午三點,五個位子,Reservation
|
| 124 |
+
可以外送到辦公室嗎?,Others
|
| 125 |
+
這禮拜六中午十二點,三人,Reservation
|
| 126 |
+
幫我叫計程車,Others
|
| 127 |
+
我想預約今晚九點,三位,Reservation
|
| 128 |
+
今晚九點,訂兩位位子,Reservation
|
| 129 |
+
明天晚上七點,三人,靠窗,Reservation
|
| 130 |
+
請問附近有停車場嗎?,Others
|
| 131 |
+
可以外送到辦公室嗎?,Others
|
| 132 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 133 |
+
下星期五晚上八點,四個人,Reservation
|
| 134 |
+
我要三杯抹茶拿鐵,Others
|
| 135 |
+
這禮拜六中午十二點,三人,Reservation
|
| 136 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 137 |
+
今天晚上九點,四個位子,Reservation
|
| 138 |
+
下星期五晚上八點半,有沒有四人桌?,Reservation
|
| 139 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 140 |
+
我想訂今晚六點半,三個人位子,Reservation
|
| 141 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 142 |
+
今晚九點,訂兩位位子,Reservation
|
| 143 |
+
明天早上十一點,兩個位子,靠窗,Reservation
|
| 144 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 145 |
+
今天晚上九點,四個位子,Reservation
|
| 146 |
+
我要三份雞腿便當,Others
|
| 147 |
+
今天有牛排套餐嗎?,Others
|
| 148 |
+
今晚八點有位子嗎?我要三個人,Reservation
|
| 149 |
+
今天有牛排套餐嗎?,Others
|
| 150 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 151 |
+
可以外送到辦公室嗎?,Others
|
| 152 |
+
請問附近有停車場嗎?,Others
|
| 153 |
+
你們有賣蛋糕嗎?,Others
|
| 154 |
+
可以外送到辦公室嗎?,Others
|
| 155 |
+
請問你們有提供素食餐點嗎?,Others
|
| 156 |
+
禮拜天中午十二點半,四個人,Reservation
|
| 157 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 158 |
+
請問附近有停車場嗎?,Others
|
| 159 |
+
我想預約今晚九點,三位,Reservation
|
| 160 |
+
我要三杯珍珠奶茶,Others
|
| 161 |
+
請問今天有什麼優惠?,Others
|
| 162 |
+
明天中午十二點,五位,靠近門口,Reservation
|
| 163 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 164 |
+
後天晚上六點半,兩位位子,Reservation
|
| 165 |
+
兩杯冰拿鐵,不加糖,Others
|
| 166 |
+
預約今晚七點,兩人桌,Reservation
|
| 167 |
+
幫我送到台北車站,Others
|
| 168 |
+
今晚九點,訂兩位位子,Reservation
|
| 169 |
+
下星期五晚上八點,四個人,Reservation
|
| 170 |
+
今天有牛排套餐嗎?,Others
|
| 171 |
+
幫我送到台北車站,Others
|
| 172 |
+
我要兩份鹽酥雞,Others
|
| 173 |
+
幫我外帶兩份豬排飯,Others
|
| 174 |
+
後天晚上七點,五個人,要包廂,Reservation
|
| 175 |
+
請問有免費Wi-Fi嗎?,Others
|
| 176 |
+
我要三份雞腿便當,Others
|
| 177 |
+
後天下午五點,兩位,靠窗,Reservation
|
| 178 |
+
明天晚上七點,三人,靠窗,Reservation
|
| 179 |
+
星期五晚上七點半,六個人,Reservation
|
| 180 |
+
幫我外帶兩份豬排飯,Others
|
| 181 |
+
你們有賣蛋糕嗎?,Others
|
| 182 |
+
請問今天有什麼優惠?,Others
|
| 183 |
+
禮拜天中午十二點半,四個人,Reservation
|
| 184 |
+
請問今天有什麼優惠?,Others
|
| 185 |
+
這禮拜六中午十二點,三人,Reservation
|
| 186 |
+
幫我訂明天晚上七點,六位,Reservation
|
| 187 |
+
兩杯冰拿鐵,不加糖,Others
|
| 188 |
+
今天有牛排套餐嗎?,Others
|
| 189 |
+
星期六下午三點,五個位子,Reservation
|
| 190 |
+
我要兩份鹽酥雞,Others
|
| 191 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 192 |
+
請問你們幾點打烊?,Others
|
| 193 |
+
可以外送到辦公室嗎?,Others
|
| 194 |
+
我想訂今晚六點半,三個人位子,Reservation
|
| 195 |
+
我要訂今晚七點半,兩位,靠窗的位置,Reservation
|
| 196 |
+
我要兩份鹽酥雞、一杯可樂,Others
|
| 197 |
+
禮拜天中午十二點半,四個人,Reservation
|
| 198 |
+
我要兩份鹽酥雞,Others
|
| 199 |
+
幫我送到台北車站,Others
|
| 200 |
+
後天下午五點,兩位,靠窗,Reservation
|
| 201 |
+
今天晚上九點,四個位子,Reservation
|
requirements.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ==============================
|
| 2 |
+
# 訓練BART
|
| 3 |
+
# ==============================
|
| 4 |
+
import os
|
| 5 |
+
from datasets import load_dataset
|
| 6 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TrainingArguments, Trainer
|
| 7 |
+
import numpy as np
|
| 8 |
+
from sklearn.metrics import precision_recall_fscore_support, accuracy_score
|
| 9 |
+
from huggingface_hub import HfApi, HfFolder
|
| 10 |
+
# 登入 Hugging Face
|
| 11 |
+
hf_token = os.environ["TOGETHER_API_KEY"]
|
| 12 |
+
HfFolder.save_token(hf_token)
|
| 13 |
+
#push_to_hub_model_id = "picard47at/tuned-albert-tiny" # Add this line
|
| 14 |
+
|
| 15 |
+
push_to_hub_model_id = "picard47at/tunned_albert_model2"
|
| 16 |
+
# 1. Load the dataset
|
| 17 |
+
#dataset_name = "picard47at/dataset2"
|
| 18 |
+
dataset_name = "Luigi/dinercall-intent"
|
| 19 |
+
try:
|
| 20 |
+
dataset = load_dataset(dataset_name)
|
| 21 |
+
print(f"Dataset '{dataset_name}' loaded successfully.")
|
| 22 |
+
print(dataset)
|
| 23 |
+
except Exception as e:
|
| 24 |
+
print(f"Error loading dataset '{dataset_name}': {e}")
|
| 25 |
+
exit()
|
| 26 |
+
|
| 27 |
+
# Ensure the dataset has 'train' and optionally 'validation' splits
|
| 28 |
+
if 'train' not in dataset:
|
| 29 |
+
print("Error: The dataset must contain a 'train' split.")
|
| 30 |
+
exit()
|
| 31 |
+
|
| 32 |
+
# If a validation split doesn't exist, create one
|
| 33 |
+
if 'validation' not in dataset:
|
| 34 |
+
print("Warning: The dataset does not have a 'validation' split. Creating one from the training data.")
|
| 35 |
+
dataset = dataset['train'].train_test_split(test_size=0.1)
|
| 36 |
+
dataset['validation'] = dataset['test']
|
| 37 |
+
del dataset['test']
|
| 38 |
+
print(dataset)
|
| 39 |
+
|
| 40 |
+
# Assuming your dataset has a 'text' column for the input and a 'label' column for the target
|
| 41 |
+
text_column = "text" # Adjust if your text column has a different name
|
| 42 |
+
label_column = "label" # Adjust if your label column has a different name
|
| 43 |
+
|
| 44 |
+
# 2. Load the tokenizer and model
|
| 45 |
+
checkpoint = "ckiplab/albert-tiny-chinese"
|
| 46 |
+
try:
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
| 48 |
+
model = AutoModelForSequenceClassification.from_pretrained(checkpoint, num_labels=len(dataset['train'].features[label_column].names))
|
| 49 |
+
print(f"Tokenizer and model '{checkpoint}' loaded successfully.")
|
| 50 |
+
except Exception as e:
|
| 51 |
+
print(f"Error loading tokenizer or model '{checkpoint}': {e}")
|
| 52 |
+
exit()
|
| 53 |
+
|
| 54 |
+
# 3. Preprocess the dataset
|
| 55 |
+
def tokenize_function(examples):
|
| 56 |
+
return tokenizer(examples[text_column], truncation=True)
|
| 57 |
+
|
| 58 |
+
tokenized_datasets = dataset.map(tokenize_function, batched=True)
|
| 59 |
+
|
| 60 |
+
# 4. Define training arguments
|
| 61 |
+
output_dir = "./albert-tiny-chinese-finetuned2"
|
| 62 |
+
batch_size = 16
|
| 63 |
+
num_epochs = 100
|
| 64 |
+
logging_steps = len(tokenized_datasets["train"]) // (5 * batch_size) # Log every 5 steps
|
| 65 |
+
#save_steps = logging_steps * 2
|
| 66 |
+
|
| 67 |
+
save_steps = logging_steps # Save at every logging step
|
| 68 |
+
eval_steps = logging_steps
|
| 69 |
+
'''
|
| 70 |
+
training_args = TrainingArguments(
|
| 71 |
+
output_dir=output_dir,
|
| 72 |
+
learning_rate=2e-5,
|
| 73 |
+
per_device_train_batch_size=batch_size,
|
| 74 |
+
per_device_eval_batch_size=batch_size,
|
| 75 |
+
num_train_epochs=num_epochs,
|
| 76 |
+
weight_decay=0.01,
|
| 77 |
+
evaluation_strategy="epoch",
|
| 78 |
+
save_strategy="steps",
|
| 79 |
+
logging_steps=logging_steps,
|
| 80 |
+
save_steps=save_steps,
|
| 81 |
+
load_best_model_at_end=True,
|
| 82 |
+
metric_for_best_model="eval_loss", # Can also use "eval_f1" if you adjust compute_metrics
|
| 83 |
+
push_to_hub=False,
|
| 84 |
+
)'''
|
| 85 |
+
|
| 86 |
+
"""
|
| 87 |
+
The error message indicates that load_best_model_at_end requires the evaluation_strategy and save_strategy to have the same value. In the original code, evaluation_strategy was set to "epoch" while save_strategy was set to "steps".
|
| 88 |
+
|
| 89 |
+
To fix this, I've made the following changes in the Canvas:
|
| 90 |
+
|
| 91 |
+
Changed evaluation_strategy from "epoch" to "steps".
|
| 92 |
+
Set save_steps to logging_steps to ensure a save happens at the same frequency as evaluation.
|
| 93 |
+
Added eval_steps and set it to logging_steps to explicitly control the evaluation frequency.
|
| 94 |
+
"""
|
| 95 |
+
'''
|
| 96 |
+
training_args = TrainingArguments(
|
| 97 |
+
output_dir=output_dir,
|
| 98 |
+
learning_rate=2e-5,
|
| 99 |
+
per_device_train_batch_size=batch_size,
|
| 100 |
+
per_device_eval_batch_size=batch_size,
|
| 101 |
+
num_train_epochs=num_epochs,
|
| 102 |
+
weight_decay=0.01,
|
| 103 |
+
evaluation_strategy="steps", # Change to "steps" to match save_strategy
|
| 104 |
+
save_strategy="steps",
|
| 105 |
+
logging_steps=logging_steps,
|
| 106 |
+
save_steps=save_steps,
|
| 107 |
+
eval_steps=eval_steps,
|
| 108 |
+
load_best_model_at_end=True,
|
| 109 |
+
metric_for_best_model="eval_loss", # Can also use "eval_f1" if you adjust compute_metrics
|
| 110 |
+
push_to_hub=False,
|
| 111 |
+
|
| 112 |
+
)
|
| 113 |
+
'''
|
| 114 |
+
training_args = TrainingArguments(
|
| 115 |
+
output_dir=output_dir,
|
| 116 |
+
learning_rate=2e-5,
|
| 117 |
+
per_device_train_batch_size=batch_size,
|
| 118 |
+
per_device_eval_batch_size=batch_size,
|
| 119 |
+
num_train_epochs=num_epochs,
|
| 120 |
+
weight_decay=0.01,
|
| 121 |
+
evaluation_strategy="steps",
|
| 122 |
+
save_strategy="steps",
|
| 123 |
+
logging_steps=logging_steps,
|
| 124 |
+
save_steps=save_steps,
|
| 125 |
+
eval_steps=eval_steps,
|
| 126 |
+
load_best_model_at_end=True,
|
| 127 |
+
metric_for_best_model="eval_loss",
|
| 128 |
+
push_to_hub=True,
|
| 129 |
+
hub_model_id=push_to_hub_model_id,
|
| 130 |
+
save_total_limit=1, # Add this line
|
| 131 |
+
)
|
| 132 |
+
# 5. Define a function to compute metrics
|
| 133 |
+
def compute_metrics(eval_pred):
|
| 134 |
+
predictions = np.argmax(eval_pred.predictions, axis=-1)
|
| 135 |
+
labels = eval_pred.label_ids
|
| 136 |
+
accuracy = accuracy_score(labels, predictions)
|
| 137 |
+
precision, recall, f1, _ = precision_recall_fscore_support(labels, predictions, average='macro')
|
| 138 |
+
return {
|
| 139 |
+
'accuracy': accuracy,
|
| 140 |
+
'precision': precision,
|
| 141 |
+
'recall': recall,
|
| 142 |
+
'f1': f1,
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
# 6. Create the Trainer
|
| 146 |
+
trainer = Trainer(
|
| 147 |
+
model=model,
|
| 148 |
+
args=training_args,
|
| 149 |
+
train_dataset=tokenized_datasets["train"],
|
| 150 |
+
eval_dataset=tokenized_datasets["validation"],
|
| 151 |
+
tokenizer=tokenizer,
|
| 152 |
+
compute_metrics=compute_metrics,
|
| 153 |
+
)
|
| 154 |
+
|
| 155 |
+
# 7. Train the model
|
| 156 |
+
print("Starting training...")
|
| 157 |
+
trainer.train()
|
| 158 |
+
print("Training finished!")
|
| 159 |
+
|
| 160 |
+
# 8. Evaluate the model
|
| 161 |
+
print("Evaluating the model...")
|
| 162 |
+
evaluation_results = trainer.evaluate()
|
| 163 |
+
print(evaluation_results)
|
| 164 |
+
|
| 165 |
+
# 9. Save the fine-tuned model
|
| 166 |
+
trainer.save_model(output_dir)
|
| 167 |
+
tokenizer.save_pretrained(output_dir)
|
| 168 |
+
print(f"Fine-tuned model and tokenizer saved to '{output_dir}'.")
|
| 169 |
+
|
| 170 |
+
# 10. Push to Hub
|
| 171 |
+
|
| 172 |
+
trainer.push_to_hub()
|
| 173 |
+
print(f"Model pushed to Hugging Face Hub: {push_to_hub_model_id}")
|
| 174 |
+
|
upload.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ==============================
|
| 2 |
+
# 上傳fine tuned後的BERT模型
|
| 3 |
+
# ==============================
|
| 4 |
+
import os
|
| 5 |
+
from huggingface_hub import HfApi,HfFolder
|
| 6 |
+
# 登入 Hugging Face
|
| 7 |
+
hf_token = os.environ["TOGETHER_API_KEY"]
|
| 8 |
+
|
| 9 |
+
HfFolder.save_token(hf_token)
|
| 10 |
+
api = HfApi(token=os.getenv("HF_TOKEN"))
|
| 11 |
+
output_dir = "./albert-tiny-chinese-finetuned"
|
| 12 |
+
api.upload_folder(
|
| 13 |
+
folder_path=output_dir,
|
| 14 |
+
repo_id="picard47at/tuned-albert-tiny",
|
| 15 |
+
repo_type="model",
|
| 16 |
+
)
|