Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -101,15 +101,15 @@ system_instruction_component = gr.Textbox(
|
|
101 |
visible=False # Por defecto no visible
|
102 |
)
|
103 |
|
104 |
-
def toggle_system_instruction(
|
105 |
-
return gr.update(visible=
|
106 |
|
107 |
# Definir los componentes de entrada y salida
|
108 |
chatbot_component = gr.Chatbot(
|
109 |
label='Gemini',
|
110 |
bubble_full_width=False,
|
111 |
scale=2,
|
112 |
-
height=
|
113 |
)
|
114 |
text_prompt_component = gr.Textbox(
|
115 |
placeholder="Message...", show_label=False, autofocus=True, scale=8
|
@@ -124,9 +124,10 @@ model_choice_component = gr.Dropdown(
|
|
124 |
label="Select Model",
|
125 |
scale=2
|
126 |
)
|
127 |
-
system_instruction_toggle = gr.
|
128 |
-
label="
|
129 |
-
|
|
|
130 |
scale=1
|
131 |
)
|
132 |
|
|
|
101 |
visible=False # Por defecto no visible
|
102 |
)
|
103 |
|
104 |
+
def toggle_system_instruction(option: str):
|
105 |
+
return gr.update(visible=option == "Enable")
|
106 |
|
107 |
# Definir los componentes de entrada y salida
|
108 |
chatbot_component = gr.Chatbot(
|
109 |
label='Gemini',
|
110 |
bubble_full_width=False,
|
111 |
scale=2,
|
112 |
+
height=300
|
113 |
)
|
114 |
text_prompt_component = gr.Textbox(
|
115 |
placeholder="Message...", show_label=False, autofocus=True, scale=8
|
|
|
124 |
label="Select Model",
|
125 |
scale=2
|
126 |
)
|
127 |
+
system_instruction_toggle = gr.Dropdown(
|
128 |
+
label="System Instruction",
|
129 |
+
choices=["Disable", "Enable"],
|
130 |
+
value="Disable",
|
131 |
scale=1
|
132 |
)
|
133 |
|