BlinkDL commited on
Commit
5baab88
1 Parent(s): 5aaf0af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ nvmlInit()
18
  gpu_h = nvmlDeviceGetHandleByIndex(0)
19
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
20
 
21
- ctx_limit = 3500
22
  ########################## text rwkv ################################################################
23
  from rwkv.utils import PIPELINE, PIPELINE_ARGS
24
 
@@ -285,7 +285,7 @@ with gr.Blocks(title=title) as demo:
285
  submit = gr.Button("Submit", variant="primary")
286
  clear = gr.Button("Clear", variant="secondary")
287
  output = gr.Textbox(label="Output", lines=5)
288
- data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples, label="Example Instructions", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
289
  submit.click(evaluate, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
290
  clear.click(lambda: None, [], [output])
291
  data.click(lambda x: x, [data], [prompt, token_count, temperature, top_p, presence_penalty, count_penalty])
 
18
  gpu_h = nvmlDeviceGetHandleByIndex(0)
19
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
20
 
21
+ ctx_limit = 3000
22
  ########################## text rwkv ################################################################
23
  from rwkv.utils import PIPELINE, PIPELINE_ARGS
24
 
 
285
  submit = gr.Button("Submit", variant="primary")
286
  clear = gr.Button("Clear", variant="secondary")
287
  output = gr.Textbox(label="Output", lines=5)
288
+ data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples, samples_per_page=50, label="Example Instructions", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
289
  submit.click(evaluate, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
290
  clear.click(lambda: None, [], [output])
291
  data.click(lambda x: x, [data], [prompt, token_count, temperature, top_p, presence_penalty, count_penalty])