Spaces:
Running
Running
enable web search by default
Browse files
app.py
CHANGED
|
@@ -252,7 +252,7 @@ with gr.Blocks(title="LLM Inference with ZeroGPU") as demo:
|
|
| 252 |
info="Choose from available models."
|
| 253 |
)
|
| 254 |
# Create the Enable Web Search checkbox.
|
| 255 |
-
enable_search_checkbox = gr.Checkbox(label="Enable Web Search", value=
|
| 256 |
info="Include recent search context to improve answers.")
|
| 257 |
# Create the System Prompt textbox with an initial value.
|
| 258 |
system_prompt_text = gr.Textbox(label="System Prompt",
|
|
@@ -271,9 +271,9 @@ with gr.Blocks(title="LLM Inference with ZeroGPU") as demo:
|
|
| 271 |
repeat_penalty_slider = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.1, step=0.1,
|
| 272 |
info="Penalizes token repetition to improve diversity.")
|
| 273 |
gr.Markdown("### Web Search Settings")
|
| 274 |
-
max_results_number = gr.Number(label="Max Search Results", value=
|
| 275 |
info="Maximum number of search results to retrieve.")
|
| 276 |
-
max_chars_number = gr.Number(label="Max Chars per Result", value=
|
| 277 |
info="Maximum characters to retrieve per search result.")
|
| 278 |
clear_button = gr.Button("Clear Chat")
|
| 279 |
cancel_button = gr.Button("Cancel Generation")
|
|
|
|
| 252 |
info="Choose from available models."
|
| 253 |
)
|
| 254 |
# Create the Enable Web Search checkbox.
|
| 255 |
+
enable_search_checkbox = gr.Checkbox(label="Enable Web Search", value=True,
|
| 256 |
info="Include recent search context to improve answers.")
|
| 257 |
# Create the System Prompt textbox with an initial value.
|
| 258 |
system_prompt_text = gr.Textbox(label="System Prompt",
|
|
|
|
| 271 |
repeat_penalty_slider = gr.Slider(label="Repetition Penalty", minimum=1.0, maximum=2.0, value=1.1, step=0.1,
|
| 272 |
info="Penalizes token repetition to improve diversity.")
|
| 273 |
gr.Markdown("### Web Search Settings")
|
| 274 |
+
max_results_number = gr.Number(label="Max Search Results", value=10, precision=0,
|
| 275 |
info="Maximum number of search results to retrieve.")
|
| 276 |
+
max_chars_number = gr.Number(label="Max Chars per Result", value=2000, precision=0,
|
| 277 |
info="Maximum characters to retrieve per search result.")
|
| 278 |
clear_button = gr.Button("Clear Chat")
|
| 279 |
cancel_button = gr.Button("Cancel Generation")
|