File size: 1,824 Bytes
b5d5782
f01bf19
 
b5d5782
 
 
 
 
 
 
 
 
 
 
 
 
 
761ce14
b5d5782
761ce14
 
b5d5782
 
 
 
 
 
347cb50
8994c84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cf0f253
 
 
 
 
 
8994c84
1
2
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
---
language:
- ko
dataset_info:
  features:
  - name: index
    dtype: string
  - name: question
    dtype: string
  - name: answer
    dtype: string
  - name: category
    dtype: string
  - name: image
    dtype: image
  splits:
  - name: test
    num_bytes: 9682476.0
    num_examples: 240
  download_size: 3340015
  dataset_size: 9682476.0
configs:
- config_name: default
  data_files:
  - split: test
    path: data/test-*
---

[NCSOFT/K-DTCBench](https://huggingface.co/datasets/NCSOFT/K-DTCBench) 를 쓰기 좋게 바꾸어놓았습니다.  

아래 코드를 이용하였습니다. 
```python
from datasets import load_dataset, Dataset
from huggingface_hub import login; login(token="YOUR TOKEN")

dataset = load_dataset("NCSOFT/K-DTCBench")

def transform_format(example):
    formatted_question = f"{example['question']}\nOptions: A: {example['choice_a']}, B: {example['choice_b']}, C: {example['choice_c']}, D: {example['choice_d']}\n주어진 선택지 중 해당 옵션의 문자로 직접 답하세요."
    
    return {
        "question": formatted_question,
        "answer": example['answer'],
        "image": example['image'],
        "index": example['index'],
        "category": example['category'],
    }

new_test_dataset = dataset['test'].map(transform_format, remove_columns=[
    'choice_a', 'choice_b', 'choice_c', 'choice_d'
])

new_dataset = {}
new_dataset['test'] = new_test_dataset

from datasets import DatasetDict
new_dataset_dict = DatasetDict(new_dataset)

new_dataset_dict.push_to_hub('Ryoo72/K-DTCBench', private=False, max_shard_size="500MB")
```

아래 inference 문구 중 적절한 것을 선택하거나 추가하세요.
```
공식 : \n\n한 단어 또는 구를 사용하여 질문에 답하세요.
\n주어진 선택지 중 해당 옵션의 문자로 직접 답하세요.
```