Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from huggingface_hub import hf_hub_download
|
|
5 |
from pynvml import *
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
-
ctx_limit =
|
9 |
gen_limit = 500
|
10 |
gen_limit_long = 800
|
11 |
title = "RWKV-x060-World-7B-v3-20241112-ctx4096"
|
@@ -351,7 +351,7 @@ with gr.Blocks(title=title) as demo:
|
|
351 |
with gr.Row():
|
352 |
submit = gr.Button("Submit", variant="primary")
|
353 |
clear = gr.Button("Clear", variant="secondary")
|
354 |
-
output = gr.Textbox(label="Output", lines=
|
355 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_eng, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
356 |
submit.click(evaluate_eng, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
357 |
clear.click(lambda: None, [], [output])
|
@@ -371,7 +371,7 @@ with gr.Blocks(title=title) as demo:
|
|
371 |
with gr.Row():
|
372 |
submit = gr.Button("Submit", variant="primary")
|
373 |
clear = gr.Button("Clear", variant="secondary")
|
374 |
-
output = gr.Textbox(label="Output", lines=
|
375 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_chn, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
376 |
submit.click(evaluate_chn, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
377 |
clear.click(lambda: None, [], [output])
|
@@ -391,7 +391,7 @@ with gr.Blocks(title=title) as demo:
|
|
391 |
with gr.Row():
|
392 |
submit = gr.Button("Submit", variant="primary")
|
393 |
clear = gr.Button("Clear", variant="secondary")
|
394 |
-
output = gr.Textbox(label="Output", lines=
|
395 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_wyw, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
396 |
submit.click(evaluate_wyw, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
397 |
clear.click(lambda: None, [], [output])
|
|
|
5 |
from pynvml import *
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
+
ctx_limit = 1536
|
9 |
gen_limit = 500
|
10 |
gen_limit_long = 800
|
11 |
title = "RWKV-x060-World-7B-v3-20241112-ctx4096"
|
|
|
351 |
with gr.Row():
|
352 |
submit = gr.Button("Submit", variant="primary")
|
353 |
clear = gr.Button("Clear", variant="secondary")
|
354 |
+
output = gr.Textbox(label="Output", lines=20, max_lines=100)
|
355 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_eng, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
356 |
submit.click(evaluate_eng, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
357 |
clear.click(lambda: None, [], [output])
|
|
|
371 |
with gr.Row():
|
372 |
submit = gr.Button("Submit", variant="primary")
|
373 |
clear = gr.Button("Clear", variant="secondary")
|
374 |
+
output = gr.Textbox(label="Output", lines=20, max_lines=100)
|
375 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_chn, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
376 |
submit.click(evaluate_chn, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
377 |
clear.click(lambda: None, [], [output])
|
|
|
391 |
with gr.Row():
|
392 |
submit = gr.Button("Submit", variant="primary")
|
393 |
clear = gr.Button("Clear", variant="secondary")
|
394 |
+
output = gr.Textbox(label="Output", lines=20, max_lines=100)
|
395 |
data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples_wyw, samples_per_page=50, label="Examples", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
|
396 |
submit.click(evaluate_wyw, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
|
397 |
clear.click(lambda: None, [], [output])
|