Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -196,13 +196,16 @@ chatbot = gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='HealthAssistant
|
|
196 |
# Build the Gradio interface.
|
197 |
with gr.Blocks(css=css) as demo:
|
198 |
gr.HTML(DESCRIPTION)
|
199 |
-
|
|
|
|
|
|
|
200 |
gr.ChatInterface(
|
201 |
fn=chat_with_openai,
|
202 |
chatbot=chatbot,
|
203 |
fill_height=True,
|
204 |
-
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False, visible=False),
|
205 |
additional_inputs=[
|
|
|
206 |
gr.Slider(minimum=0.6, maximum=0.6, step=0.1, value=0.6, label="Temperature", render=False, visible=False),
|
207 |
gr.Slider(minimum=1024, maximum=4096, step=128, value=2048, label="Max new tokens", render=False, visible=False),
|
208 |
],
|
@@ -214,7 +217,7 @@ with gr.Blocks(css=css) as demo:
|
|
214 |
],
|
215 |
cache_examples=False,
|
216 |
)
|
217 |
-
|
218 |
gr.Markdown(LICENSE)
|
219 |
|
220 |
if __name__ == "__main__":
|
|
|
196 |
# Build the Gradio interface.
|
197 |
with gr.Blocks(css=css) as demo:
|
198 |
gr.HTML(DESCRIPTION)
|
199 |
+
|
200 |
+
# Add the checkbox directly to the layout
|
201 |
+
fast_mode_checkbox = gr.Checkbox(label="Fast Mode (Skips Reasoning, Provides Immediate Responses)", value=False)
|
202 |
+
|
203 |
gr.ChatInterface(
|
204 |
fn=chat_with_openai,
|
205 |
chatbot=chatbot,
|
206 |
fill_height=True,
|
|
|
207 |
additional_inputs=[
|
208 |
+
fast_mode_checkbox, # Use the checkbox directly here
|
209 |
gr.Slider(minimum=0.6, maximum=0.6, step=0.1, value=0.6, label="Temperature", render=False, visible=False),
|
210 |
gr.Slider(minimum=1024, maximum=4096, step=128, value=2048, label="Max new tokens", render=False, visible=False),
|
211 |
],
|
|
|
217 |
],
|
218 |
cache_examples=False,
|
219 |
)
|
220 |
+
|
221 |
gr.Markdown(LICENSE)
|
222 |
|
223 |
if __name__ == "__main__":
|