Spaces:
Sleeping
Sleeping
Fix generation slider metadata
Browse files- __pycache__/app.cpython-312.pyc +0 -0
- app.py +21 -3
__pycache__/app.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
|
|
|
app.py
CHANGED
|
@@ -408,9 +408,27 @@ with gr.Blocks(theme=THEME, css=CSS, title="FormosanBank MT") as demo:
|
|
| 408 |
info="Use a specific dialect only if you know it.",
|
| 409 |
)
|
| 410 |
with gr.Accordion("Generation controls", open=False):
|
| 411 |
-
max_new_tokens = gr.Slider(
|
| 412 |
-
|
| 413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
gr.Markdown(
|
| 415 |
"""
|
| 416 |
<div class="metric-card">
|
|
|
|
| 408 |
info="Use a specific dialect only if you know it.",
|
| 409 |
)
|
| 410 |
with gr.Accordion("Generation controls", open=False):
|
| 411 |
+
max_new_tokens = gr.Slider(
|
| 412 |
+
label="Max new tokens",
|
| 413 |
+
minimum=24,
|
| 414 |
+
maximum=256,
|
| 415 |
+
value=128,
|
| 416 |
+
step=8,
|
| 417 |
+
)
|
| 418 |
+
num_beams = gr.Slider(
|
| 419 |
+
label="Beam size",
|
| 420 |
+
minimum=1,
|
| 421 |
+
maximum=8,
|
| 422 |
+
value=4,
|
| 423 |
+
step=1,
|
| 424 |
+
)
|
| 425 |
+
repetition_penalty = gr.Slider(
|
| 426 |
+
label="Repetition penalty",
|
| 427 |
+
minimum=1.0,
|
| 428 |
+
maximum=1.5,
|
| 429 |
+
value=1.15,
|
| 430 |
+
step=0.05,
|
| 431 |
+
)
|
| 432 |
gr.Markdown(
|
| 433 |
"""
|
| 434 |
<div class="metric-card">
|