khan123 commited on
Commit
327e3b5
โ€ข
1 Parent(s): 398693d

add text mapping process

Browse files
.ipynb_checkpoints/app-checkpoint.py DELETED
@@ -1,56 +0,0 @@
1
- # Gaepago model V1 (CPU Test)
2
-
3
- # import package
4
- from transformers import AutoModelForAudioClassification
5
- from transformers import AutoFeatureExtractor
6
- from transformers import pipeline
7
- from datasets import Dataset, Audio
8
- import gradio as gr
9
- import torch
10
-
11
- # Set model & Dataset NM
12
- MODEL_NAME = "Gae8J/gaepago-20"
13
- DATASET_NAME = "Gae8J/modeling_v1"
14
-
15
- # Import Model & feature extractor
16
- # model = AutoModelForAudioClassification.from_pretrained(MODEL_NAME)
17
- from transformers import AutoConfig
18
- config = AutoConfig.from_pretrained(MODEL_NAME)
19
- model = torch.jit.load(f"./model/gaepago-20-lite/model_quant_int8.pt")
20
- feature_extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)
21
-
22
- # ๋ชจ๋ธ cpu๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ง„ํ–‰
23
- model.to("cpu")
24
-
25
- # Gaepago Inference Model function
26
- def gaepago_fn(tmp_audio_dir):
27
- print(tmp_audio_dir)
28
- audio_dataset = Dataset.from_dict({"audio": [tmp_audio_dir]}).cast_column("audio", Audio(sampling_rate=16000))
29
- inputs = feature_extractor(audio_dataset[0]["audio"]["array"]
30
- ,sampling_rate=audio_dataset[0]["audio"]["sampling_rate"]
31
- ,return_tensors="pt")
32
- with torch.no_grad():
33
- # logits = model(**inputs).logits
34
- logits = model(**inputs)["logits"]
35
- # predicted_class_ids = torch.argmax(logits).item()
36
- # predicted_label = model.config.id2label[predicted_class_ids]
37
- predicted_class_ids = torch.argmax(logits).item()
38
- predicted_label = config.id2label[predicted_class_ids]
39
-
40
- return predicted_label
41
-
42
- # Main
43
- main_api = gr.Blocks()
44
-
45
- with main_api:
46
- gr.Markdown("## 8J Gaepago Demo(with CPU)")
47
- with gr.Row():
48
- audio = gr.Audio(source="microphone", type="filepath"
49
- ,label='๋…น์Œ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ดˆ์ฝ”๊ฐ€ ํ•˜๋Š” ๋ง์„ ๋“ค๋ ค์ฃผ์„ธ์š”')
50
- transcription = gr.Textbox(label='์ง€๊ธˆ ์ดˆ์ฝ”๊ฐ€ ํ•˜๋Š” ๋ง์€...')
51
- b1 = gr.Button("๊ฐ•์•„์ง€ ์–ธ์–ด ๋ฒˆ์—ญ!")
52
-
53
- b1.click(gaepago_fn, inputs=audio, outputs=transcription)
54
- # examples = gr.Examples(examples=example_list,
55
- # inputs=[audio])
56
- main_api.launch(share=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.ipynb_checkpoints/eval_and_inference-checkpoint.ipynb DELETED
@@ -1,279 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "id": "544a588c-68ff-440f-be5c-389f1f02a0b7",
6
- "metadata": {},
7
- "source": [
8
- "# example"
9
- ]
10
- },
11
- {
12
- "cell_type": "code",
13
- "execution_count": 1,
14
- "id": "7ef8c97c-cefd-4905-8d63-af303c412d1a",
15
- "metadata": {},
16
- "outputs": [],
17
- "source": [
18
- "MODEL_NAME = \"gaepago-20\"\n",
19
- "DATASET_NAME = \"Gae8J/modeling_v1\""
20
- ]
21
- },
22
- {
23
- "cell_type": "markdown",
24
- "id": "044499ce-7821-4b59-9f4b-5971b6a24cce",
25
- "metadata": {},
26
- "source": [
27
- "## load dataset (test data)"
28
- ]
29
- },
30
- {
31
- "cell_type": "code",
32
- "execution_count": 2,
33
- "id": "e827e3bb-820d-46b3-b2e8-fdb97787bde1",
34
- "metadata": {},
35
- "outputs": [
36
- {
37
- "name": "stderr",
38
- "output_type": "stream",
39
- "text": [
40
- "Found cached dataset parquet (/home/jovyan/.cache/huggingface/datasets/Gae8J___parquet/Gae8J--modeling_v1-b480c78c61a26816/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec)\n"
41
- ]
42
- },
43
- {
44
- "data": {
45
- "application/vnd.jupyter.widget-view+json": {
46
- "model_id": "f078fd108d2044b48a961bee6ed49747",
47
- "version_major": 2,
48
- "version_minor": 0
49
- },
50
- "text/plain": [
51
- " 0%| | 0/3 [00:00<?, ?it/s]"
52
- ]
53
- },
54
- "metadata": {},
55
- "output_type": "display_data"
56
- }
57
- ],
58
- "source": [
59
- "from datasets import load_dataset, Audio\n",
60
- "\n",
61
- "dataset = load_dataset(DATASET_NAME)\n",
62
- "dataset = dataset.cast_column(\"audio\", Audio(sampling_rate=16000))\n",
63
- "test_data = dataset['test']\n",
64
- "sampling_rate = test_data.features[\"audio\"].sampling_rate"
65
- ]
66
- },
67
- {
68
- "cell_type": "markdown",
69
- "id": "d0c16b3d-32dd-4e61-86bd-e21232840e98",
70
- "metadata": {},
71
- "source": [
72
- "## run"
73
- ]
74
- },
75
- {
76
- "cell_type": "code",
77
- "execution_count": 5,
78
- "id": "d504778d-4ba3-43d3-b22b-76ce838a5edf",
79
- "metadata": {},
80
- "outputs": [],
81
- "source": [
82
- "from transformers import AutoModelForAudioClassification\n",
83
- "from transformers import AutoFeatureExtractor\n",
84
- "import torch\n",
85
- "\n",
86
- "model = AutoModelForAudioClassification.from_pretrained(MODEL_NAME)\n",
87
- "feature_extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)\n",
88
- "\n",
89
- "preds = []\n",
90
- "gts = []\n",
91
- "for i in range(len(test_data)):\n",
92
- " inputs = feature_extractor(test_data[i][\"audio\"][\"array\"], sampling_rate=sampling_rate, return_tensors=\"pt\")\n",
93
- " with torch.no_grad():\n",
94
- " logits = model(**inputs).logits\n",
95
- " predicted_class_ids = torch.argmax(logits).item()\n",
96
- " predicted_label = model.config.id2label[predicted_class_ids]\n",
97
- " preds.append(predicted_label)\n",
98
- " gts.append(model.config.id2label[test_data[i]['label']])"
99
- ]
100
- },
101
- {
102
- "cell_type": "markdown",
103
- "id": "f200bec5-c2d9-4549-8bb8-1400c484f499",
104
- "metadata": {},
105
- "source": [
106
- "## performance"
107
- ]
108
- },
109
- {
110
- "cell_type": "code",
111
- "execution_count": 6,
112
- "id": "be97683d-da60-4d23-abc9-0be9b86cd636",
113
- "metadata": {},
114
- "outputs": [
115
- {
116
- "name": "stdout",
117
- "output_type": "stream",
118
- "text": [
119
- " precision recall f1-score support\n",
120
- "\n",
121
- " bark 0.56 0.62 0.59 8\n",
122
- " growling 1.00 0.83 0.91 6\n",
123
- " howl 0.75 0.86 0.80 7\n",
124
- " panting 1.00 0.80 0.89 10\n",
125
- " whimper 0.38 0.43 0.40 7\n",
126
- "\n",
127
- " accuracy 0.71 38\n",
128
- " macro avg 0.74 0.71 0.72 38\n",
129
- "weighted avg 0.75 0.71 0.72 38\n",
130
- "\n"
131
- ]
132
- }
133
- ],
134
- "source": [
135
- "from sklearn.metrics import classification_report\n",
136
- "test_performance = classification_report(gts, preds)\n",
137
- "print(test_performance)"
138
- ]
139
- },
140
- {
141
- "cell_type": "markdown",
142
- "id": "ea3ee48d-19c7-4f9d-9c2c-4b03d4748acb",
143
- "metadata": {},
144
- "source": [
145
- "## load dataset (validation data)"
146
- ]
147
- },
148
- {
149
- "cell_type": "code",
150
- "execution_count": 7,
151
- "id": "33e5051e-75a2-4523-905c-fe1dbc81eda2",
152
- "metadata": {},
153
- "outputs": [
154
- {
155
- "name": "stderr",
156
- "output_type": "stream",
157
- "text": [
158
- "WARNING:datasets.builder:Found cached dataset parquet (/home/jovyan/.cache/huggingface/datasets/Gae8J___parquet/Gae8J--modeling_v1-b480c78c61a26816/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec)\n"
159
- ]
160
- },
161
- {
162
- "data": {
163
- "application/vnd.jupyter.widget-view+json": {
164
- "model_id": "cf5cfe439c174b8284b4668419af6dca",
165
- "version_major": 2,
166
- "version_minor": 0
167
- },
168
- "text/plain": [
169
- " 0%| | 0/3 [00:00<?, ?it/s]"
170
- ]
171
- },
172
- "metadata": {},
173
- "output_type": "display_data"
174
- }
175
- ],
176
- "source": [
177
- "from datasets import load_dataset, Audio\n",
178
- "\n",
179
- "dataset = load_dataset(DATASET_NAME)\n",
180
- "dataset = dataset.cast_column(\"audio\", Audio(sampling_rate=16000))\n",
181
- "test_data = dataset['validation']\n",
182
- "sampling_rate = test_data.features[\"audio\"].sampling_rate"
183
- ]
184
- },
185
- {
186
- "cell_type": "markdown",
187
- "id": "36bee3b3-e66f-46dc-8030-cef3cb62ff97",
188
- "metadata": {},
189
- "source": [
190
- "## run"
191
- ]
192
- },
193
- {
194
- "cell_type": "code",
195
- "execution_count": 9,
196
- "id": "914a471c-5d76-482b-a4f3-3c5eeebdd697",
197
- "metadata": {},
198
- "outputs": [],
199
- "source": [
200
- "from transformers import AutoModelForAudioClassification\n",
201
- "import torch\n",
202
- "\n",
203
- "model = AutoModelForAudioClassification.from_pretrained(MODEL_NAME)\n",
204
- "feature_extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)\n",
205
- "\n",
206
- "preds = []\n",
207
- "gts = []\n",
208
- "for i in range(len(test_data)):\n",
209
- " inputs = feature_extractor(test_data[i][\"audio\"][\"array\"], sampling_rate=sampling_rate, return_tensors=\"pt\")\n",
210
- " with torch.no_grad():\n",
211
- " logits = model(**inputs).logits\n",
212
- " predicted_class_ids = torch.argmax(logits).item()\n",
213
- " predicted_label = model.config.id2label[predicted_class_ids]\n",
214
- " preds.append(predicted_label)\n",
215
- " gts.append(model.config.id2label[test_data[i]['label']])"
216
- ]
217
- },
218
- {
219
- "cell_type": "markdown",
220
- "id": "4f1d5bab-4f88-4628-918e-d14b29c2143b",
221
- "metadata": {},
222
- "source": [
223
- "## performance"
224
- ]
225
- },
226
- {
227
- "cell_type": "code",
228
- "execution_count": 10,
229
- "id": "26e0c704-b5b6-4bf0-8b58-1e3615b76cb7",
230
- "metadata": {},
231
- "outputs": [
232
- {
233
- "name": "stdout",
234
- "output_type": "stream",
235
- "text": [
236
- " precision recall f1-score support\n",
237
- "\n",
238
- " bark 0.75 0.67 0.71 9\n",
239
- " growling 1.00 0.71 0.83 7\n",
240
- " howl 0.86 0.86 0.86 7\n",
241
- " panting 1.00 0.70 0.82 10\n",
242
- " whimper 0.54 1.00 0.70 7\n",
243
- "\n",
244
- " accuracy 0.78 40\n",
245
- " macro avg 0.83 0.79 0.78 40\n",
246
- "weighted avg 0.84 0.78 0.78 40\n",
247
- "\n"
248
- ]
249
- }
250
- ],
251
- "source": [
252
- "from sklearn.metrics import classification_report\n",
253
- "valid_performance = classification_report(gts, preds)\n",
254
- "print(valid_performance)"
255
- ]
256
- }
257
- ],
258
- "metadata": {
259
- "kernelspec": {
260
- "display_name": "g3p8",
261
- "language": "python",
262
- "name": "g3p8"
263
- },
264
- "language_info": {
265
- "codemirror_mode": {
266
- "name": "ipython",
267
- "version": 3
268
- },
269
- "file_extension": ".py",
270
- "mimetype": "text/x-python",
271
- "name": "python",
272
- "nbconvert_exporter": "python",
273
- "pygments_lexer": "ipython3",
274
- "version": "3.7.9"
275
- }
276
- },
277
- "nbformat": 4,
278
- "nbformat_minor": 5
279
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.ipynb_checkpoints/eval_and_inference_lite_v1-checkpoint.ipynb DELETED
@@ -1,189 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "id": "544a588c-68ff-440f-be5c-389f1f02a0b7",
6
- "metadata": {},
7
- "source": [
8
- "# example"
9
- ]
10
- },
11
- {
12
- "cell_type": "code",
13
- "execution_count": 1,
14
- "id": "7ef8c97c-cefd-4905-8d63-af303c412d1a",
15
- "metadata": {},
16
- "outputs": [],
17
- "source": [
18
- "MODEL_NAME = \"gaepago-20-lite\"\n",
19
- "DATASET_NAME = \"Gae8J/modeling_v1\""
20
- ]
21
- },
22
- {
23
- "cell_type": "markdown",
24
- "id": "044499ce-7821-4b59-9f4b-5971b6a24cce",
25
- "metadata": {},
26
- "source": [
27
- "## load dataset (test data)"
28
- ]
29
- },
30
- {
31
- "cell_type": "code",
32
- "execution_count": 2,
33
- "id": "e827e3bb-820d-46b3-b2e8-fdb97787bde1",
34
- "metadata": {},
35
- "outputs": [
36
- {
37
- "name": "stderr",
38
- "output_type": "stream",
39
- "text": [
40
- "WARNING:datasets.builder:Found cached dataset parquet (/home/jovyan/.cache/huggingface/datasets/Gae8J___parquet/Gae8J--modeling_v1-b480c78c61a26816/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec)\n"
41
- ]
42
- },
43
- {
44
- "data": {
45
- "application/vnd.jupyter.widget-view+json": {
46
- "model_id": "4438f0b33464423b92fecc698c1935e5",
47
- "version_major": 2,
48
- "version_minor": 0
49
- },
50
- "text/plain": [
51
- " 0%| | 0/3 [00:00<?, ?it/s]"
52
- ]
53
- },
54
- "metadata": {},
55
- "output_type": "display_data"
56
- }
57
- ],
58
- "source": [
59
- "from datasets import load_dataset, Audio\n",
60
- "from transformers import AutoFeatureExtractor\n",
61
- "dataset = load_dataset(DATASET_NAME)\n",
62
- "dataset = dataset.cast_column(\"audio\", Audio(sampling_rate=16000))\n",
63
- "test_data = dataset['test']\n",
64
- "sampling_rate = test_data.features[\"audio\"].sampling_rate\n",
65
- "feature_extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)"
66
- ]
67
- },
68
- {
69
- "cell_type": "code",
70
- "execution_count": 7,
71
- "id": "779c547a-7e27-4481-8a66-fd9900e41964",
72
- "metadata": {},
73
- "outputs": [],
74
- "source": [
75
- "from transformers import AutoConfig\n",
76
- "config = AutoConfig.from_pretrained(MODEL_NAME)"
77
- ]
78
- },
79
- {
80
- "cell_type": "code",
81
- "execution_count": 3,
82
- "id": "03659af7-3d90-4431-a4ea-a8d99e93602f",
83
- "metadata": {},
84
- "outputs": [],
85
- "source": [
86
- "import torch"
87
- ]
88
- },
89
- {
90
- "cell_type": "code",
91
- "execution_count": 4,
92
- "id": "0f58cfcf-ba2d-45e4-b4e9-87df88e9dbad",
93
- "metadata": {},
94
- "outputs": [],
95
- "source": [
96
- "loaded_quantized_model = torch.jit.load(\"gaepago-20-lite/model_quant_int8.pt\")"
97
- ]
98
- },
99
- {
100
- "cell_type": "markdown",
101
- "id": "52212656-a3e9-4bd2-ac2d-427acb5795c6",
102
- "metadata": {},
103
- "source": [
104
- "## ๋ชจ๋ธ๊ฒฐ๊ณผ"
105
- ]
106
- },
107
- {
108
- "cell_type": "code",
109
- "execution_count": 9,
110
- "id": "3d4f5365-d6f1-4163-9c47-ce8c89e13884",
111
- "metadata": {},
112
- "outputs": [],
113
- "source": [
114
- "preds = []\n",
115
- "gts = []\n",
116
- "# quant_logits_list = []\n",
117
- "for i in range(len(test_data)):\n",
118
- " inputs = feature_extractor(test_data[i][\"audio\"][\"array\"], sampling_rate=sampling_rate, return_tensors=\"pt\")\n",
119
- " with torch.no_grad():\n",
120
- " logits = loaded_quantized_model(**inputs)['logits']\n",
121
- "# quant_logits_list.append(logits)\n",
122
- " predicted_class_ids = torch.argmax(logits).item()\n",
123
- " predicted_label = config.id2label[predicted_class_ids]\n",
124
- " preds.append(predicted_label)\n",
125
- " gts.append(config.id2label[test_data[i]['label']])"
126
- ]
127
- },
128
- {
129
- "cell_type": "code",
130
- "execution_count": 10,
131
- "id": "93b3c424-bab6-4774-915e-9e9f534f762d",
132
- "metadata": {},
133
- "outputs": [
134
- {
135
- "name": "stdout",
136
- "output_type": "stream",
137
- "text": [
138
- " precision recall f1-score support\n",
139
- "\n",
140
- " bark 0.5556 0.6250 0.5882 8\n",
141
- " growling 1.0000 0.8333 0.9091 6\n",
142
- " howl 0.7500 0.8571 0.8000 7\n",
143
- " panting 1.0000 0.8000 0.8889 10\n",
144
- " whimper 0.3750 0.4286 0.4000 7\n",
145
- "\n",
146
- " accuracy 0.7105 38\n",
147
- " macro avg 0.7361 0.7088 0.7172 38\n",
148
- "weighted avg 0.7452 0.7105 0.7224 38\n",
149
- "\n"
150
- ]
151
- }
152
- ],
153
- "source": [
154
- "from sklearn.metrics import classification_report\n",
155
- "test_performance = classification_report(gts, preds,digits=4)\n",
156
- "print(test_performance)"
157
- ]
158
- },
159
- {
160
- "cell_type": "code",
161
- "execution_count": null,
162
- "id": "99a3ea38-54c8-4aed-9bbf-12f98bf09dc5",
163
- "metadata": {},
164
- "outputs": [],
165
- "source": []
166
- }
167
- ],
168
- "metadata": {
169
- "kernelspec": {
170
- "display_name": "g3p8",
171
- "language": "python",
172
- "name": "g3p8"
173
- },
174
- "language_info": {
175
- "codemirror_mode": {
176
- "name": "ipython",
177
- "version": 3
178
- },
179
- "file_extension": ".py",
180
- "mimetype": "text/x-python",
181
- "name": "python",
182
- "nbconvert_exporter": "python",
183
- "pygments_lexer": "ipython3",
184
- "version": "3.7.9"
185
- }
186
- },
187
- "nbformat": 4,
188
- "nbformat_minor": 5
189
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.ipynb_checkpoints/text_label-checkpoint.json DELETED
@@ -1,528 +0,0 @@
1
- {
2
- "bark": [
3
- [
4
- "๋„ˆ๋ฌด ์‹ ๋‚˜์„œ ์–ด์ฉŒ์ง€?",
5
- "๊ธ์ •"
6
- ],
7
- [
8
- "์ง‘์‚ฌ, ๋†€์•„์ค˜!",
9
- "๊ธ์ •"
10
- ],
11
- [
12
- "์ง€๊ธˆ ๋„ˆ๋ฌด ์‹ ๋‚˜!",
13
- "๊ธ์ •"
14
- ],
15
- [
16
- "๋ˆ„๊ฐ€ ์™”๋‚˜ ๋ด!",
17
- "๊ธ์ •"
18
- ],
19
- [
20
- "๋†€์•„์ค˜!! ๋†€์•„๋‹ฌ๋ž€๋ง์ด์•ผ!!",
21
- "๊ธ์ •"
22
- ],
23
- [
24
- "์•ˆ๋…• ๐Ÿถ",
25
- "๊ธ์ •"
26
- ],
27
- [
28
- "๋‚œ ๋„ˆ๋ฅผ ์ข‹์•„ํ•˜๋Š” ๊ฑธ, ๊ทธ๋Ÿฐ๋ฐ ๋„ˆ๋Š” ๋‚˜๋ฅผ ์ข‹์•„ํ•ด?",
29
- "๊ธ์ •"
30
- ],
31
- [
32
- "์ฃผ๋ชฉํ•ด์ค˜! ๋†€์ž!",
33
- "๊ธ์ •"
34
- ],
35
- [
36
- "๋†€์ด ์‹œ๊ฐ„์ด์•ผ, ๊ฐ™์ด ๋†€์ž!",
37
- "๊ธ์ •"
38
- ],
39
- [
40
- "๋‹ค๊ฐ€์˜ค์ง€๋งˆ!",
41
- "๋ถ€์ •"
42
- ],
43
- [
44
- "๋ญ”๊ฐ€ ์ด์ƒํ•œ ์†Œ๋ฆฌ ๋“ค๋ ค!",
45
- "๋ถ€์ •"
46
- ],
47
- [
48
- "๊ฒฝ๊ณ„ํ•ด, ๊ฒฝ๊ณ„ํ•ด!",
49
- "๋ถ€์ •"
50
- ],
51
- [
52
- "์•„๋‹ˆ์•ผ, ์•„๋‹ˆ์•ผ!",
53
- "๋ถ€์ •"
54
- ],
55
- [
56
- "๊ฑด๋“ค์ง€๋งˆ!!!!",
57
- "๋ถ€์ •"
58
- ],
59
- [
60
- "๋ญ”๊ฐ€ ๋ถˆ์•ˆํ•ด, ๋„์™€์ค˜!",
61
- "๋ถ€์ •"
62
- ],
63
- [
64
- "์ฃผ์ธ~ ๋ญํ•ด~?",
65
- "์ค‘๋ฆฝ"
66
- ],
67
- [
68
- "๋ฐ–์— ๋ญ๊ฐ€ ์žˆ๋Š” ๊ฑฐ ๊ฐ™์•„!",
69
- "์ค‘๋ฆฝ"
70
- ],
71
- [
72
- "์ด๋ฆฌ ์™€๋ด!",
73
- "์ค‘๋ฆฝ"
74
- ],
75
- [
76
- "๋‚  ๋ณด๊ณ ์žˆ์–ด?",
77
- "์ค‘๋ฆฝ"
78
- ],
79
- [
80
- "๋ฐ–์— ๋ญ ์žˆ์–ด?",
81
- "์ค‘๋ฆฝ"
82
- ],
83
- [
84
- "์ด๊ฑฐ ๋‚ด๊บผ์•ผ!",
85
- "์ค‘๋ฆฝ"
86
- ],
87
- [
88
- "๋ฌผ ๋งˆ์‹ค๋ž˜, ๋งˆ์‹ค ๊ฒƒ ์ข€ ์ค˜.",
89
- "์ค‘๋ฆฝ"
90
- ],
91
- [
92
- "๋ชฉ์ด ๋ง๋ผ, ๋ฌผ ์ข€ ์ค„๋ž˜?",
93
- "์ค‘๋ฆฝ"
94
- ]
95
- ],
96
- "growling": [
97
- [
98
- "๋‚˜ ์ข€ ๋‚ด๋ฒ„๋ ค ๋‘ฌ!",
99
- "๋ถ€์ •"
100
- ],
101
- [
102
- "๋” ์ด์ƒ ๋‹ค๊ฐ€์˜ค์ง€๋งˆ!",
103
- "๋ถ€์ •"
104
- ],
105
- [
106
- "๋„ˆ๋ฌด ๊นŒ๋‹ค๋กœ์›Œ!",
107
- "๋ถ€์ •"
108
- ],
109
- [
110
- "๋‚ด๊ฐ€ ๊ฒฝ๊ณ„ํ•˜๊ณ  ์žˆ์–ด!",
111
- "๋ถ€์ •"
112
- ],
113
- [
114
- "๋นจ๋ฆฌ ์ด๋ฆฌ ์™€!",
115
- "๋ถ€์ •"
116
- ],
117
- [
118
- "๋‚˜ ๋„ˆ๋ฌด ํ™”๋‚˜!",
119
- "๋ถ€์ •"
120
- ],
121
- [
122
- "๋‚˜ ์‹ธ์šธ ์ค€๋น„๋์–ด!",
123
- "๋ถ€์ •"
124
- ],
125
- [
126
- "๊ทธ๋งŒ ์ข€ ํ•ด!",
127
- "๋ถ€์ •"
128
- ],
129
- [
130
- "๋‚ด๊ฒŒ ์žฅ๋‚œ์น˜์ง€๋งˆ!",
131
- "๋ถ€์ •"
132
- ],
133
- [
134
- "๋‚˜ ์ง€๊ธˆ ๋„ˆ๋ฌด ์งœ์ฆ๋‚˜!",
135
- "๋ถ€์ •"
136
- ],
137
- [
138
- "๋‚˜ ์ง€๊ธˆ ์•ˆ ์ข‹์•„!",
139
- "๋ถ€์ •"
140
- ],
141
- [
142
- "๋‹ค๊ฐ€์˜ค์ง€๋งˆ!",
143
- "๋ถ€์ •"
144
- ],
145
- [
146
- "๋„ˆ์—๊ฒŒ ํ™”๋‚œ ๊ฑฐ์•ผ!",
147
- "๋ถ€์ •"
148
- ],
149
- [
150
- "์ข€ ๋ฉ€๋ฆฌ ๊ฐ€!",
151
- "๋ถ€์ •"
152
- ],
153
- [
154
- "๋‚˜ ์‹ธ์šฐ๋ ค๊ณ  ์ค€๋น„๋์–ด!",
155
- "๋ถ€์ •"
156
- ],
157
- [
158
- "ํ•œ๋ฒˆ ๋” ๊ฑด๋“œ๋ฆฌ๋ฉด ๋ฌผ์–ด๋ฒ„๋ฆด๊ฑฐ์•ผ!!!",
159
- "๋ถ€์ •"
160
- ],
161
- [
162
- "๋‚˜ํ•œํ…Œ ์ด๋ ‡๊ฒŒ ์œ„ํ˜‘์ ์œผ๋กœ ๋‹ค๊ฐ€์˜ค์ง€๋งˆ!",
163
- "๋ถ€์ •"
164
- ],
165
- [
166
- "๋‚˜์˜ ์˜์—ญ์„ ์นจ๋ฒ”ํ•˜๋ฉด ์•ˆ๋ผ! ์ดํ•ดํ•ด์ค˜!",
167
- "๋ถ€์ •"
168
- ],
169
- [
170
- "๊ทธ๋งŒ ์ข€ ๊ท€์ฐฎ๊ฒŒ ํ•ด! ๋‚ด๊ฐ€ ๋ถ„๋ช…ํžˆ ๊ฒฝ๊ณ ํ–ˆ์ž–์•„!",
171
- "๋ถ€์ •"
172
- ],
173
- [
174
- "๋ถˆํŽธํ•ด, ๋ฌผ๋Ÿฌ์„œ์ค˜.",
175
- "๋ถ€์ •"
176
- ],
177
- [
178
- "๊ฒฝ๊ณ ํ•˜๋Š” ๊ฑฐ์•ผ, ๊ฐ€๊นŒ์ด ์˜ค์ง€ ๋งˆ.",
179
- "๋ถ€์ •"
180
- ],
181
- [
182
- "์ข€ ๋„ˆ๋ฌด ๊ฐ€๊นŒ์›Œ, ๊ฑฐ๋ฆฌ ์ข€ ๋‘ฌ.",
183
- "๋ถ€์ •"
184
- ],
185
- [
186
- "๋‚˜๋ฅผ ๋ฐฉํ•ดํ•˜์ง€ ๋งˆ, ์‹ ๊ฒฝ ์จ์ค˜.",
187
- "๋ถ€์ •"
188
- ],
189
- [
190
- "๋‚ด๊ฐ€ ๋ถˆํŽธํ•ด, ๊ฑฐ๋ฆฌ ์ข€ ๋‘๊ณ  ์žˆ์–ด.",
191
- "๋ถ€์ •"
192
- ],
193
- [
194
- "๊ฐ€๊นŒ์ด ์˜ค์ง€ ๋งˆ.",
195
- "๋ถ€์ •"
196
- ],
197
- [
198
- "๋‚˜๋ฅผ ๋ฐฉํ•ดํ•˜์ง€ ๋งˆ, ์กด์ค‘ํ•ด์ค˜. Respect Me!!",
199
- "๋ถ€์ •"
200
- ]
201
- ],
202
- "howl": [
203
- [
204
- "๋‚˜ ์—ฌ๊ธฐ์žˆ์–ด, ๋ด์ค˜!",
205
- "์ค‘๋ฆฝ"
206
- ],
207
- [
208
- "๋„ˆ ์–ด๋”” ๊ฐ”์–ด?!",
209
- "์ค‘๋ฆฝ"
210
- ],
211
- [
212
- "๋‚˜ ๋„ˆ๋ฌด ์™ธ๋กœ์›Œ!",
213
- "์ค‘๋ฆฝ"
214
- ],
215
- [
216
- "์ด๋ฆฌ ์™€๋ด, ๋‚˜ ์žˆ๋Š” ๊ณณ์œผ๋กœ!",
217
- "์ค‘๋ฆฝ"
218
- ],
219
- [
220
- "๋„ˆ ์—†์œผ๋ฉด ๋„ˆ๋ฌด ์‹ฌ์‹ฌํ•ด!",
221
- "์ค‘๋ฆฝ"
222
- ],
223
- [
224
- "๋‚˜๋„ ๊ฐ™์ด ๊ฐ€๊ณ  ์‹ถ์–ด!",
225
- "์ค‘๋ฆฝ"
226
- ],
227
- [
228
- "๋‚˜ ์‹ฌ์‹ฌํ•ด",
229
- "์ค‘๋ฆฝ"
230
- ],
231
- [
232
- "์–ด๋””์•ผ? ๋‚˜ ์ฐพ์•„๋ด!",
233
- "์ค‘๋ฆฝ"
234
- ],
235
- [
236
- "์–ธ์ œ ์˜ค๋ ค๊ณ  ๊ทธ๋ž˜?",
237
- "์ค‘๋ฆฝ"
238
- ],
239
- [
240
- "๋‚˜๋Š” ์—ฌ๊ธฐ ์žˆ๋Š”๋ฐ!",
241
- "์ค‘๋ฆฝ"
242
- ],
243
- [
244
- "๋นจ๋ฆฌ ๋Œ์•„์™€์ค˜!",
245
- "์ค‘๋ฆฝ"
246
- ],
247
- [
248
- "๋‚˜ ํ˜ผ์ž ๋‚จ๊ฒจ๋‘์ง€ ๋งˆ!",
249
- "์ค‘๋ฆฝ"
250
- ],
251
- [
252
- "๋‚˜ ์—ฌ๊ธฐ์žˆ์–ด!! ๋‚˜์ข€ ๋ด์ค˜!!!",
253
- "์ค‘๋ฆฝ"
254
- ],
255
- [
256
- "๋‚˜ ์ž˜ ๋ณด๊ณ  ์žˆ์–ด? ๋‚˜ ๊ดœ์ฐฎ์•„?",
257
- "์ค‘๋ฆฝ"
258
- ],
259
- [
260
- "์ฃผ์ธ, ๋‚˜ ์ข€ ์•ˆ์•„์ค„ ์ˆ˜ ์žˆ์„๊นŒ?",
261
- "์ค‘๋ฆฝ"
262
- ],
263
- [
264
- "์™ธ๋กœ์›Œ, ๋ณด๊ณ  ์‹ถ์–ด.",
265
- "์ค‘๋ฆฝ"
266
- ],
267
- [
268
- "๋‹ค๋ฅธ ๊ฐ•์•„์ง€์™€ 'ํ•ฉ์ฐฝ'ํ•˜๊ณ  ์‹ถ์–ด.",
269
- "์ค‘๋ฆฝ"
270
- ],
271
- [
272
- "๋„ˆ๋ฅผ ๋ณด๊ณ ์‹ถ์–ด, ์–ธ์ œ ์™€?",
273
- "์ค‘๋ฆฝ"
274
- ],
275
- [
276
- "๋ฌด์–ธ๊ฐ€ ์•Œ๋ ค๊ณ  ํ•˜๋Š” ์ค‘์ด์•ผ.",
277
- "์ค‘๋ฆฝ"
278
- ],
279
- [
280
- "๋‹ค๋ฅธ ๊ฐ•์•„์ง€๋“ค์ด๋ž‘ ๋…ธ๋ž˜ํ•˜๊ณ  ์‹ถ์–ด.",
281
- "๊ธ์ •"
282
- ]
283
- ],
284
- "panting": [
285
- [
286
- "๋”์›Œ~ ์—์–ด์ปจ ์ผœ์ค˜.",
287
- "๋ถ€์ •"
288
- ],
289
- [
290
- "์šด๋™ ํ›„ ํœด์‹ ์ค‘์ด์•ผ.",
291
- "์ค‘๋ฆฝ"
292
- ],
293
- [
294
- "์ˆจ์ด ์ฐจ, ์ข€ ๋„์™€์ค˜.",
295
- "๋ถ€์ •"
296
- ],
297
- [
298
- "ํœด์‹์ด ํ•„์š”ํ•ด, ์ข€ ์‰ฌ์ž.",
299
- "๋ถ€์ •"
300
- ],
301
- [
302
- "๋„ˆ๋ฌด ๋”์›Œ, ๋ฌผ ์ข€ ์ค„๋ž˜?",
303
- "๋ถ€์ •"
304
- ],
305
- [
306
- "๋„ˆ๋ฌด ๋”์›Œ, ๋ฐ”๋žŒ ์ข€ ์ฌ์ž.",
307
- "๋ถ€์ •"
308
- ],
309
- [
310
- "ํž˜๋“ค๊ฒŒ ์šด๋™ํ–ˆ์–ด, ํœด์‹ ์ข€!",
311
- "๋ถ€์ •"
312
- ],
313
- [
314
- "์ˆจ์ด ์ฐจ, ์‰ฌ๋Š” ์‹œ๊ฐ„์ด ํ•„์š”ํ•ด.",
315
- "๋ถ€์ •"
316
- ],
317
- [
318
- "ํœด์‹์ด ํ•„์š”ํ•ด, ์กฐ์šฉํžˆ ์ข€...",
319
- "๋ถ€์ •"
320
- ],
321
- [
322
- "๋ฌผ ์ข€ ๋งˆ์‹œ๊ณ  ์‹ถ์–ด, ์ค„๋ž˜?",
323
- "์ค‘๋ฆฝ"
324
- ],
325
- [
326
- "๋งŽ์ด ๋›ฐ์–ด์„œ ํž˜๋“ค์–ด, ํœด์‹์ด ํ•„์š”ํ•ด.",
327
- "๋ถ€์ •"
328
- ],
329
- [
330
- "ํœด์‹์ด ํ•„์š”ํ•ด, ์ข€ ๋” ์‰ฌ์ž.",
331
- "์ค‘๋ฆฝ"
332
- ],
333
- [
334
- "๋„ˆ๋ฌด ๋”์›Œ์„œ ๋ฌผ ์ข€ ๋งˆ์‹œ๊ณ  ์‹ถ์–ด.",
335
- "์ค‘๋ฆฝ"
336
- ],
337
- [
338
- "์ข€ ๋”์šด ๏ฟฝ๏ฟฝ ๊ฐ™์•„, ๋ฐ”๋žŒ ์ข€ ์ฌ๊ณ  ์‹ถ์–ด.",
339
- "์ค‘๋ฆฝ"
340
- ],
341
- [
342
- "์ง€๊ธˆ ์ข€ ์‰ด ์‹œ๊ฐ„์ด ํ•„์š”ํ•ด, ์ž ์‹œ๋งŒ ๊ธฐ๋‹ค๋ ค.",
343
- "์ค‘๋ฆฝ"
344
- ],
345
- [
346
- "์ง€๊ธˆ ์ง„์ •ํ•  ์‹œ๊ฐ„์ด ํ•„์š”ํ•ด!!!",
347
- "์ค‘๋ฆฝ"
348
- ],
349
- [
350
- "๋‚˜ ์ง€๊ธˆ ๋„ˆ๋ฌด ์‹ ๋‚˜",
351
- "๊ธ์ •"
352
- ],
353
- [
354
- "๋„ˆ๋ž‘ ๋†€๋ฉด ๋” ์žฌ๋ฐŒ์„ ๊ฒƒ ๊ฐ™์•„",
355
- "๊ธ์ •"
356
- ],
357
- [
358
- "๋‚˜๋ž‘ ๋†€์ง€ ์•Š์„๋ž˜?",
359
- "๊ธ์ •"
360
- ],
361
- [
362
- "๋ฐ–์— ๋‚˜๊ฐ€๋ฉด ์žฌ๋ฏธ๋‚œ ์ผ์ด ์žˆ์„ ๊ฒƒ ๊ฐ™์•„!",
363
- "๊ธ์ •"
364
- ],
365
- [
366
- "์˜ค๋Š˜์€ ๋ฌด์Šจ ์ผ์ด ์žˆ์„๊นŒ? ์ข‹์€ ์ผ์ด ์ƒ๊ธธ ๊ฒƒ ๊ฐ™์•„!",
367
- "๊ธ์ •"
368
- ],
369
- [
370
- "์„ธ์ƒ ๋ชจ๋“  ๊ฒƒ๋“ค์ด ๋ฐ˜๊ฐ€์›Œ~",
371
- "๊ธ์ •"
372
- ],
373
- [
374
- "๋„ˆ๋ž‘ ์นœํ•ด์ง€๊ณ  ์‹ถ์–ด~",
375
- "๊ธ์ •"
376
- ],
377
- [
378
- "์˜ค๋Š˜ ๊ธฐ๋ถ„ ์•„์ฃผ ๋‚˜์ด์Šค~",
379
- "๊ธ์ •"
380
- ],
381
- [
382
- "์„ธ์ƒ์—์„œ ์ œ์ผ ์ข‹์•„!!",
383
- "๊ธ์ •"
384
- ],
385
- [
386
- "๋‚˜ ์ง€๊ธˆ ๊ธฐ๋ถ„์ด๊ฐ€ ์ข‹์•„~",
387
- "๊ธ์ •"
388
- ],
389
- [
390
- "๋„ˆ๋ž‘ ๋†€๊ณ ์‹ถ์–ด~",
391
- "๊ธ์ •"
392
- ],
393
- [
394
- "์˜ค๋Š˜ ๋˜๊ฒŒ ํ–‰๋ณตํ•œ ํ•˜๋ฃจ๋‹ค~",
395
- "๊ธ์ •"
396
- ],
397
- [
398
- "์˜ค๋Š˜ ๋‚ด ์ƒ์ผ์ธ๊ฐ€? ๋„ˆ๋ฌด ํ–‰๋ณตํ•ด><",
399
- "๊ธ์ •"
400
- ],
401
- [
402
- "๋งŒ๋‚˜์„œ ๋ฐ˜๊ฐ€์›Œ",
403
- "๊ธ์ •"
404
- ],
405
- [
406
- "๋„ˆ๋Š” ์ด๋ฆ„์ด ๋ญ๋‹ˆ?",
407
- "๊ธ์ •"
408
- ],
409
- [
410
- "๋‚œ ๋„ˆ๊ฐ€ ์ข‹์•„!!",
411
- "๊ธ์ •"
412
- ],
413
- [
414
- "๋‚˜ ๋งค์šฐ ์žฌ๋ฐŒ์–ด",
415
- "๊ธ์ •"
416
- ],
417
- [
418
- "๋‚˜๋ž‘ ๊ฐ™์ด ๋†€๋Ÿฌ ๋‚˜๊ฐ€์ž",
419
- "๊ธ์ •"
420
- ]
421
- ],
422
- "whimper": [
423
- [
424
- "๋‚˜ ๋„ˆ๋ฌด ๋‘๋ ค์›Œ",
425
- "๋ถ€์ •"
426
- ],
427
- [
428
- "๋‚˜ ์ง€๊ธˆ ๋„ˆ๋ฌด ์™ธ๋กœ์›Œ",
429
- "๋ถ€์ •"
430
- ],
431
- [
432
- "๋‚˜ ๋„ˆ๋ฌด ์Šฌํผ",
433
- "๋ถ€์ •"
434
- ],
435
- [
436
- "๋‚˜ ์ข€ ์•ˆ์•„์ค˜",
437
- "๋ถ€์ •"
438
- ],
439
- [
440
- "๋‚˜ ์ง€๊ธˆ ๋„ˆ๋ฌด ๋ถˆํŽธํ•ด",
441
- "๋ถ€์ •"
442
- ],
443
- [
444
- "๋‚˜ ๋„ˆ๋ฌด ํ”ผ๊ณคํ•ด",
445
- "๋ถ€์ •"
446
- ],
447
- [
448
- "์กฐ๊ธˆ๋งŒ ๋” ์•ˆ์•„์ค˜",
449
- "๋ถ€์ •"
450
- ],
451
- [
452
- "๋‚˜ ์ข€ ์œ„๋กœํ•ด์ค˜",
453
- "๋ถ€์ •"
454
- ],
455
- [
456
- "๋‚˜ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์ค‘",
457
- "๋ถ€์ •"
458
- ],
459
- [
460
- "์™ธ๋กœ์›Œ์„œ ๋ˆˆ๋ฌผ์ด ๋‚˜",
461
- "๋ถ€์ •"
462
- ],
463
- [
464
- "๋‚˜ ์ƒ์ฒ˜๋ฐ›์•˜์–ด, ๋„ˆ๋ฌด ๋‘๋ ค์›Œ...ใ… ใ…กใ… ",
465
- "๋ถ€์ •"
466
- ],
467
- [
468
- "๋‚˜ ๋†€๋ž˜์ช„ใ… ใ…กใ…  ํž๊ตฌํž๊ตฌ..",
469
- "๋ถ€์ •"
470
- ],
471
- [
472
- "๋ฌด์…”์›Œ... ์•ˆ์•„์ฃ ~~~",
473
- "๋ถ€์ •"
474
- ],
475
- [
476
- "๋„ˆ๋ฌด ์Šฌํผ์„œ ๋ง˜์ด ์•„ํŒŒ... ์•ˆ์•„์ค˜...",
477
- "๋ถ€์ •"
478
- ],
479
- [
480
- "๋‚˜ ๊ธฐ๋ถ„์ด ๋„ˆ๋ฌด ์•ˆ ์ข‹์•„... ์–ด๋–ป๊ฒŒ ํ•ด์ค„๋ž˜?",
481
- "๋ถ€์ •"
482
- ],
483
- [
484
- "ํž...๋ฏธ์•ˆํ•ด...",
485
- "๋ถ€์ •"
486
- ],
487
- [
488
- "๋ถˆ์•ˆํ•ด, ๊ณ์— ์žˆ์–ด์ค˜.",
489
- "๋ถ€์ •"
490
- ],
491
- [
492
- "๋ฐ–์œผ๋กœ ๋‚˜๊ฐ€๊ณ  ์‹ถ์–ด.",
493
- "์ค‘๋ฆฝ"
494
- ],
495
- [
496
- "๋ฏธ์•ˆํ•ด, ์‹ค์ˆ˜ํ–ˆ์–ด.",
497
- "๋ถ€์ •"
498
- ],
499
- [
500
- "๋„ˆ๋ฌด ์Šฌํผ, ์œ„๋กœ ์ข€ ํ•ด์ค˜.",
501
- "๋ถ€์ •"
502
- ],
503
- [
504
- "์ŠคํŠธ๋ ˆ์Šค ๋ฐ›์•˜์–ด, ๋„์™€์ค˜.",
505
- "๋ถ€์ •"
506
- ],
507
- [
508
- "๋‚ด๊ฐ€ ๋ถˆ์•ˆํ•ด, ๋ถ™์–ด์žˆ์–ด์ค˜.",
509
- "๋ถ€์ •"
510
- ],
511
- [
512
- "๋„ˆ๋ฌด ์™ธ๋กœ์›Œ, ์• ์ •์„ ๋ณด์—ฌ์ค˜.",
513
- "๋ถ€์ •"
514
- ],
515
- [
516
- "์‚ฐ์ฑ… ์ข€ ๊ฐ€๊ณ  ์‹ถ์–ด.",
517
- "์ค‘๋ฆฝ"
518
- ],
519
- [
520
- "์ •๋ง ์Šฌํผ, ์•ˆ์•„์ค˜.",
521
- "๋ถ€์ •"
522
- ],
523
- [
524
- "์ŠคํŠธ๋ ˆ์Šค๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์•„, ์•ˆ์•„์ค˜.",
525
- "๋ถ€์ •"
526
- ]
527
- ]
528
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.ipynb_checkpoints/text_mapping_example-checkpoint.ipynb DELETED
@@ -1,90 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 13,
6
- "id": "8f925fb7-86ba-487f-ab85-88754d777860",
7
- "metadata": {
8
- "tags": []
9
- },
10
- "outputs": [],
11
- "source": [
12
- "import json\n",
13
- "with open(\"text/text_label.json\",\"r\",encoding='utf-8') as f:\n",
14
- " text_label = json.load(f)"
15
- ]
16
- },
17
- {
18
- "cell_type": "code",
19
- "execution_count": 14,
20
- "id": "d2c0a048-1db7-4236-9f26-539ed31d3d27",
21
- "metadata": {
22
- "tags": []
23
- },
24
- "outputs": [],
25
- "source": [
26
- "import random\n",
27
- "random.seed(0)\n",
28
- "def post_process(model_output,text_label):\n",
29
- " text_list = text_label[model_output]\n",
30
- " text,sent = random.sample(text_list,1)[0]\n",
31
- " return {'label' : model_output,\n",
32
- " 'text' : text,\n",
33
- " 'sentiment' : sent}"
34
- ]
35
- },
36
- {
37
- "cell_type": "code",
38
- "execution_count": 15,
39
- "id": "f8ca0ad8-bc0c-4766-8e13-fe093c5290df",
40
- "metadata": {
41
- "tags": []
42
- },
43
- "outputs": [
44
- {
45
- "data": {
46
- "text/plain": [
47
- "{'label': 'bark', 'text': '์•„๋‹ˆ์•ผ, ์•„๋‹ˆ์•ผ!', 'sentiment': '๋ถ€์ •'}"
48
- ]
49
- },
50
- "execution_count": 15,
51
- "metadata": {},
52
- "output_type": "execute_result"
53
- }
54
- ],
55
- "source": [
56
- "model_output = 'bark'\n",
57
- "post_process(model_output,text_label)"
58
- ]
59
- },
60
- {
61
- "cell_type": "code",
62
- "execution_count": null,
63
- "id": "da690a64-4dea-4b2a-89c1-23ea8bad955c",
64
- "metadata": {},
65
- "outputs": [],
66
- "source": []
67
- }
68
- ],
69
- "metadata": {
70
- "kernelspec": {
71
- "display_name": "Python 3 (ipykernel)",
72
- "language": "python",
73
- "name": "python3"
74
- },
75
- "language_info": {
76
- "codemirror_mode": {
77
- "name": "ipython",
78
- "version": 3
79
- },
80
- "file_extension": ".py",
81
- "mimetype": "text/x-python",
82
- "name": "python",
83
- "nbconvert_exporter": "python",
84
- "pygments_lexer": "ipython3",
85
- "version": "3.10.8"
86
- }
87
- },
88
- "nbformat": 4,
89
- "nbformat_minor": 5
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -7,11 +7,12 @@ from transformers import pipeline
7
  from datasets import Dataset, Audio
8
  import gradio as gr
9
  import torch
10
-
 
11
  # Set model & Dataset NM
12
  MODEL_NAME = "Gae8J/gaepago-20"
13
  DATASET_NAME = "Gae8J/modeling_v1"
14
-
15
  # Import Model & feature extractor
16
  # model = AutoModelForAudioClassification.from_pretrained(MODEL_NAME)
17
  from transformers import AutoConfig
@@ -21,6 +22,9 @@ feature_extractor = AutoFeatureExtractor.from_pretrained(MODEL_NAME)
21
 
22
  # ๋ชจ๋ธ cpu๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ง„ํ–‰
23
  model.to("cpu")
 
 
 
24
 
25
  # Gaepago Inference Model function
26
  def gaepago_fn(tmp_audio_dir):
@@ -37,7 +41,10 @@ def gaepago_fn(tmp_audio_dir):
37
  predicted_class_ids = torch.argmax(logits).item()
38
  predicted_label = config.id2label[predicted_class_ids]
39
 
40
- return predicted_label
 
 
 
41
 
42
  # Main
43
  example_list = ["./sample/bark_sample.wav"
 
7
  from datasets import Dataset, Audio
8
  import gradio as gr
9
  import torch
10
+ from utils.postprocess import text_mapping
11
+ import json
12
  # Set model & Dataset NM
13
  MODEL_NAME = "Gae8J/gaepago-20"
14
  DATASET_NAME = "Gae8J/modeling_v1"
15
+ TEXT_LABEL = "text_label.json"
16
  # Import Model & feature extractor
17
  # model = AutoModelForAudioClassification.from_pretrained(MODEL_NAME)
18
  from transformers import AutoConfig
 
22
 
23
  # ๋ชจ๋ธ cpu๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ง„ํ–‰
24
  model.to("cpu")
25
+ # TEXT LABEL ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
26
+ with open(TEXT_LABEL,"r",encoding='utf-8') as f:
27
+ text_label = json.load(f)
28
 
29
  # Gaepago Inference Model function
30
  def gaepago_fn(tmp_audio_dir):
 
41
  predicted_class_ids = torch.argmax(logits).item()
42
  predicted_label = config.id2label[predicted_class_ids]
43
 
44
+ # add postprocessing
45
+ ## 1. text mapping
46
+ output = text_mapping(predicted_label,text_label)
47
+ return output
48
 
49
  # Main
50
  example_list = ["./sample/bark_sample.wav"
text_mapping_example.ipynb CHANGED
@@ -82,7 +82,7 @@
82
  "name": "python",
83
  "nbconvert_exporter": "python",
84
  "pygments_lexer": "ipython3",
85
- "version": "3.8.16"
86
  }
87
  },
88
  "nbformat": 4,
 
82
  "name": "python",
83
  "nbconvert_exporter": "python",
84
  "pygments_lexer": "ipython3",
85
+ "version": "3.10.8"
86
  }
87
  },
88
  "nbformat": 4,
utils/__init__.py ADDED
File without changes
utils/postprocess.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import random
2
+
3
+ def text_mapping(model_output,text_label):
4
+ text_list = text_label[model_output]
5
+ text,sent = random.sample(text_list,1)[0]
6
+ return {'label' : model_output,
7
+ 'text' : text,
8
+ 'sentiment' : sent}