Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -182,7 +182,7 @@ def build_prompt(expression: str, use_think_format: bool) -> str:
|
|
| 182 |
@spaces.GPU(duration=30)
|
| 183 |
def solve(
|
| 184 |
expression: str,
|
| 185 |
-
use_think_format: bool =
|
| 186 |
temperature: float = 0.5,
|
| 187 |
top_k: int = 40,
|
| 188 |
top_p: float = 0.95,
|
|
@@ -308,9 +308,13 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 308 |
|
| 309 |
with gr.Accordion("Advanced settings", open=False):
|
| 310 |
use_think_format = gr.Checkbox(
|
| 311 |
-
label="Use production /no think chat template",
|
| 312 |
-
value=
|
| 313 |
-
info=
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
)
|
| 315 |
temperature = gr.Slider(0.0, 1.0, value=0.5, step=0.05, label="Temperature")
|
| 316 |
top_k = gr.Slider(0, 100, value=40, step=1, label="Top-k")
|
|
|
|
| 182 |
@spaces.GPU(duration=30)
|
| 183 |
def solve(
|
| 184 |
expression: str,
|
| 185 |
+
use_think_format: bool = True,
|
| 186 |
temperature: float = 0.5,
|
| 187 |
top_k: int = 40,
|
| 188 |
top_p: float = 0.95,
|
|
|
|
| 308 |
|
| 309 |
with gr.Accordion("Advanced settings", open=False):
|
| 310 |
use_think_format = gr.Checkbox(
|
| 311 |
+
label="Use production /no think chat template (recommended)",
|
| 312 |
+
value=True,
|
| 313 |
+
info=(
|
| 314 |
+
"Wraps the input in the [IM_START]/[IM_END] template with a "
|
| 315 |
+
"<think> block — the format the model was trained for, and "
|
| 316 |
+
"the most reliable. Uncheck for raw free-continuation mode."
|
| 317 |
+
),
|
| 318 |
)
|
| 319 |
temperature = gr.Slider(0.0, 1.0, value=0.5, step=0.05, label="Temperature")
|
| 320 |
top_k = gr.Slider(0, 100, value=40, step=1, label="Top-k")
|