deepseek v3 default
Browse files913 unmodified lines91491591691791891992044 unmodified lines96596696796896997097118 unmodified lines990991992993994995996997998999100010011002913 unmodified linessetting = gr.State({"system": SystemPrompt,})current_model = gr.State(AVAILABLE_MODELS[0])open_panel = gr.State(None)with gr.Sidebar():44 unmodified lines# Model selection (minimal)model_dropdown = gr.Dropdown(choices=[model['name'] for model in AVAILABLE_MODELS],value=AVAILABLE_MODELS[0]['name'],label="Model")18 unmodified linesgr.Markdown("✅ Web search available")# Hidden elements for functionalitymodel_display = gr.Markdown(f"**Model:** {AVAILABLE_MODELS[0]['name']}", visible=False)def on_model_change(model_name):for m in AVAILABLE_MODELS:if m['name'] == model_name:return m, f"**Model:** {m['name']}", update_image_input_visibility(m)return AVAILABLE_MODELS[0], f"**Model:** {AVAILABLE_MODELS[0]['name']}", update_image_input_visibility(AVAILABLE_MODELS[0])def save_prompt(input):return {setting: {"system": input}}913 unmodified lines91491591691791891992044 unmodified lines96596696796896997097118 unmodified lines990991992993994995996997998999100010011002913 unmodified linessetting = gr.State({"system": SystemPrompt,})current_model = gr.State(AVAILABLE_MODELS[1]) # DeepSeek V3open_panel = gr.State(None)with gr.Sidebar():44 unmodified lines# Model selection (minimal)model_dropdown = gr.Dropdown(choices=[model['name'] for model in AVAILABLE_MODELS],value=AVAILABLE_MODELS[1]['name'], # DeepSeek V3label="Model")18 unmodified linesgr.Markdown("✅ Web search available")# Hidden elements for functionalitymodel_display = gr.Markdown(f"**Model:** {AVAILABLE_MODELS[1]['name']}", visible=False) # DeepSeek V3def on_model_change(model_name):for m in AVAILABLE_MODELS:if m['name'] == model_name:return m, f"**Model:** {m['name']}", update_image_input_visibility(m)return AVAILABLE_MODELS[1], f"**Model:** {AVAILABLE_MODELS[1]['name']}", update_image_input_visibility(AVAILABLE_MODELS[1]) # DeepSeek V3 fallbackdef save_prompt(input):return {setting: {"system": input}}
app.py+4-4