Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -115,8 +115,6 @@ with gr.Blocks() as demo:
|
|
115 |
label="Selecciona el modelo",
|
116 |
)
|
117 |
chatbot_1 = gr.Chatbot(label="Gemini", scale=2, height=300, type="messages")
|
118 |
-
text_input_1 = gr.Textbox(placeholder="Escribe un mensaje...", show_label=False, scale=8)
|
119 |
-
run_button_1 = gr.Button(value="Enviar", variant="primary", scale=1)
|
120 |
system_instruction_1 = gr.Textbox(
|
121 |
placeholder="Escribe una instrucci贸n para el sistema...",
|
122 |
label="Instrucci贸n del sistema",
|
@@ -124,6 +122,10 @@ with gr.Blocks() as demo:
|
|
124 |
value="You are an assistant.",
|
125 |
)
|
126 |
|
|
|
|
|
|
|
|
|
127 |
run_button_1.click(
|
128 |
fn=bot_response,
|
129 |
inputs=[model_dropdown_1, system_instruction_1, text_input_1, chatbot_1],
|
@@ -137,15 +139,17 @@ with gr.Blocks() as demo:
|
|
137 |
label="Select Model",
|
138 |
)
|
139 |
chatbot_2 = gr.Chatbot(label="Gemini", height=300, type="messages")
|
140 |
-
text_input_2 = gr.Textbox(placeholder="Message or description...", show_label=False, scale=8)
|
141 |
-
upload_button = gr.UploadButton(label="Upload Images", file_count="multiple", file_types=["image"])
|
142 |
-
run_button_2 = gr.Button(value="Run", variant="primary", scale=1)
|
143 |
system_instruction_2 = gr.Textbox(
|
144 |
placeholder="Enter system instruction...",
|
145 |
label="System Instruction",
|
146 |
scale=8,
|
147 |
)
|
148 |
|
|
|
|
|
|
|
|
|
|
|
149 |
run_button_2.click(
|
150 |
fn=advanced_response,
|
151 |
inputs=[upload_button, model_dropdown_2, system_instruction_2, chatbot_2],
|
|
|
115 |
label="Selecciona el modelo",
|
116 |
)
|
117 |
chatbot_1 = gr.Chatbot(label="Gemini", scale=2, height=300, type="messages")
|
|
|
|
|
118 |
system_instruction_1 = gr.Textbox(
|
119 |
placeholder="Escribe una instrucci贸n para el sistema...",
|
120 |
label="Instrucci贸n del sistema",
|
|
|
122 |
value="You are an assistant.",
|
123 |
)
|
124 |
|
125 |
+
with gr.Row():
|
126 |
+
text_input_1 = gr.Textbox(placeholder="Escribe un mensaje...", show_label=False, scale=8)
|
127 |
+
run_button_1 = gr.Button(value="Enviar", variant="primary", scale=1)
|
128 |
+
|
129 |
run_button_1.click(
|
130 |
fn=bot_response,
|
131 |
inputs=[model_dropdown_1, system_instruction_1, text_input_1, chatbot_1],
|
|
|
139 |
label="Select Model",
|
140 |
)
|
141 |
chatbot_2 = gr.Chatbot(label="Gemini", height=300, type="messages")
|
|
|
|
|
|
|
142 |
system_instruction_2 = gr.Textbox(
|
143 |
placeholder="Enter system instruction...",
|
144 |
label="System Instruction",
|
145 |
scale=8,
|
146 |
)
|
147 |
|
148 |
+
with gr.Row():
|
149 |
+
text_input_2 = gr.Textbox(placeholder="Message or description...", show_label=False, scale=8)
|
150 |
+
upload_button = gr.UploadButton(label="Upload Images", file_count="multiple", file_types=["image"])
|
151 |
+
run_button_2 = gr.Button(value="Run", variant="primary", scale=1)
|
152 |
+
|
153 |
run_button_2.click(
|
154 |
fn=advanced_response,
|
155 |
inputs=[upload_button, model_dropdown_2, system_instruction_2, chatbot_2],
|