aixsatoshi commited on
Commit
82b85f5
โ€ข
1 Parent(s): 651de2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,7 +61,7 @@ split_name = "train" if "train" in dataset else "test" # ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใ‚’trai
61
  # ้ฉๅˆ‡ใชใ‚นใƒ—ใƒชใƒƒใƒˆใ‹ใ‚‰10ๅ€‹ใฎไพ‹ใ‚’ๅ–ๅพ—
62
  examples_list = list(dataset[split_name]) # ใ‚นใƒ—ใƒชใƒƒใƒˆใ‚’ใƒชใ‚นใƒˆใซๅค‰ๆ›
63
  examples = random.sample(examples_list, 10) # ใƒชใ‚นใƒˆใ‹ใ‚‰ใƒฉใƒณใƒ€ใƒ ใซ10ๅ€‹้ธๆŠž
64
- example_inputs = [example['input'] for example in examples]
65
 
66
  @spaces.GPU
67
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
@@ -153,7 +153,7 @@ with gr.Blocks(css=CSS) as demo:
153
  render=False,
154
  ),
155
  ],
156
- examples=example_inputs,
157
  cache_examples=False,
158
  )
159
 
 
61
  # ้ฉๅˆ‡ใชใ‚นใƒ—ใƒชใƒƒใƒˆใ‹ใ‚‰10ๅ€‹ใฎไพ‹ใ‚’ๅ–ๅพ—
62
  examples_list = list(dataset[split_name]) # ใ‚นใƒ—ใƒชใƒƒใƒˆใ‚’ใƒชใ‚นใƒˆใซๅค‰ๆ›
63
  examples = random.sample(examples_list, 10) # ใƒชใ‚นใƒˆใ‹ใ‚‰ใƒฉใƒณใƒ€ใƒ ใซ10ๅ€‹้ธๆŠž
64
+ example_inputs = [[example['input']] for example in examples] # ใƒใ‚นใƒˆใ•ใ‚ŒใŸใƒชใ‚นใƒˆใซๅค‰ๆ›
65
 
66
  @spaces.GPU
67
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
 
153
  render=False,
154
  ),
155
  ],
156
+ examples=example_inputs, # ใƒใ‚นใƒˆใ•ใ‚ŒใŸใƒชใ‚นใƒˆใ‚’ๆธกใ™
157
  cache_examples=False,
158
  )
159