Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ split_name = "train" if "train" in dataset else "test" # デフォルトをtrai
|
|
59 |
|
60 |
# 適切なスプリットから10個の例を取得
|
61 |
examples_list = list(dataset[split_name]) # スプリットをリストに変換
|
62 |
-
examples = random.sample(examples_list,
|
63 |
example_inputs = [[example['input']] for example in examples] # ネストされたリストに変換
|
64 |
|
65 |
@spaces.GPU
|
@@ -152,19 +152,19 @@ with gr.Blocks(css=CSS) as demo:
|
|
152 |
render=False,
|
153 |
),
|
154 |
],
|
155 |
-
|
156 |
-
examples=[
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
],
|
168 |
cache_examples=False,
|
169 |
)
|
170 |
|
|
|
59 |
|
60 |
# 適切なスプリットから10個の例を取得
|
61 |
examples_list = list(dataset[split_name]) # スプリットをリストに変換
|
62 |
+
examples = random.sample(examples_list, 50) # リストからランダムに10個選択
|
63 |
example_inputs = [[example['input']] for example in examples] # ネストされたリストに変換
|
64 |
|
65 |
@spaces.GPU
|
|
|
152 |
render=False,
|
153 |
),
|
154 |
],
|
155 |
+
examples=example_inputs, # ネストされたリストを渡す
|
156 |
+
#examples=[
|
157 |
+
# ["Give me five ideas for a child's summer science project."],
|
158 |
+
# ["Create a tutorial for building a breakout game using markdown."],
|
159 |
+
# ["超能力を持つ主人公のSF物語のシナリオを考えてください。伏線の設定、テーマやログラインを理論的に使用してください"],
|
160 |
+
# ["子供の夏休みの自由研究のための、5つのアイデアと、その手法を簡潔に教えてください。"],
|
161 |
+
# ["パズルゲームのスクリプト作成のためにアドバイスお願いします"],
|
162 |
+
# ["マークダウン記法にて、ブロック崩しのゲーム作成の教科書作成してください"],
|
163 |
+
# ["お笑いのトンチ大会のお題を考えてください"],
|
164 |
+
# ["日本語の慣用句、ことわざについての試験問題を考えてください"],
|
165 |
+
# ["ドラえもんの登場人物教えて"],
|
166 |
+
# ["お好み焼きの作り方教えてください"],
|
167 |
+
#],
|
168 |
cache_examples=False,
|
169 |
)
|
170 |
|