Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
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 =
|
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])
|