Spaces:
Runtime error
Runtime error
remove dropdown
Browse files- app_paligemma.py +2 -17
app_paligemma.py
CHANGED
@@ -48,14 +48,6 @@ def safe_chat_fn(message, history, client, system_prompt, temperature,
|
|
48 |
with gr.Blocks() as demo:
|
49 |
client = gr.State()
|
50 |
|
51 |
-
with gr.Row():
|
52 |
-
model_dropdown = gr.Dropdown(
|
53 |
-
choices=list(MODELS.keys()),
|
54 |
-
value="paligemma2-10b-ft-docci-448",
|
55 |
-
label="Select Model",
|
56 |
-
interactive=True
|
57 |
-
)
|
58 |
-
|
59 |
with gr.Accordion("Advanced Settings", open=False):
|
60 |
system_prompt = gr.Textbox(
|
61 |
value="You are a helpful AI assistant.",
|
@@ -91,17 +83,10 @@ with gr.Blocks() as demo:
|
|
91 |
multimodal=True
|
92 |
)
|
93 |
|
94 |
-
#
|
95 |
-
model_dropdown.change(
|
96 |
-
fn=set_client_for_session,
|
97 |
-
inputs=[model_dropdown],
|
98 |
-
outputs=[client]
|
99 |
-
)
|
100 |
-
|
101 |
-
# Initialize client on page load
|
102 |
demo.load(
|
103 |
fn=set_client_for_session,
|
104 |
-
inputs=[gr.State("Paligemma-10B")],
|
105 |
outputs=[client]
|
106 |
)
|
107 |
|
|
|
48 |
with gr.Blocks() as demo:
|
49 |
client = gr.State()
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
with gr.Accordion("Advanced Settings", open=False):
|
52 |
system_prompt = gr.Textbox(
|
53 |
value="You are a helpful AI assistant.",
|
|
|
83 |
multimodal=True
|
84 |
)
|
85 |
|
86 |
+
# Initialize client on page load with default model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
demo.load(
|
88 |
fn=set_client_for_session,
|
89 |
+
inputs=[gr.State("Paligemma-10B")], # Using default model
|
90 |
outputs=[client]
|
91 |
)
|
92 |
|