Spaces:
Running
on
Zero
Running
on
Zero
aixsatoshi
commited on
Commit
•
76f3d4e
1
Parent(s):
9a6b8ed
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ h3 {
|
|
38 |
.chatbox .messages .message.user {
|
39 |
background-color: #e1f5fe;
|
40 |
}
|
41 |
-
|
42 |
background-color: #eeeeee;
|
43 |
}
|
44 |
"""
|
@@ -51,9 +51,15 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
51 |
)
|
52 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
53 |
|
54 |
-
#
|
55 |
dataset = load_dataset("elyza/ELYZA-tasks-100")
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
example_inputs = [example['input'] for example in examples]
|
58 |
|
59 |
@spaces.GPU
|
|
|
38 |
.chatbox .messages .message.user {
|
39 |
background-color: #e1f5fe;
|
40 |
}
|
41 |
+
chatbox .messages .message.bot {
|
42 |
background-color: #eeeeee;
|
43 |
}
|
44 |
"""
|
|
|
51 |
)
|
52 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
53 |
|
54 |
+
# データセットをロードしてスプリットを確認
|
55 |
dataset = load_dataset("elyza/ELYZA-tasks-100")
|
56 |
+
print(dataset)
|
57 |
+
|
58 |
+
# 使用するスプリット名を確認
|
59 |
+
split_name = "train" if "train" in dataset else "test" # デフォルトをtrainにし、なければtestにフォールバック
|
60 |
+
|
61 |
+
# 適切なスプリットから10個の例を取得
|
62 |
+
examples = random.sample(dataset[split_name], 10)
|
63 |
example_inputs = [example['input'] for example in examples]
|
64 |
|
65 |
@spaces.GPU
|