Spaces:
Runtime error
Runtime error
Button just in case
Browse files
app.py
CHANGED
|
@@ -53,6 +53,9 @@ def record_vote(prompt: str, left_chat: List, right_chat: List,
|
|
| 53 |
"ip": request.client.host
|
| 54 |
})
|
| 55 |
print(request.client.host)
|
|
|
|
|
|
|
|
|
|
| 56 |
changeVisible = False
|
| 57 |
jsonResponse = response.json()
|
| 58 |
_id = jsonResponse["id"]
|
|
@@ -177,7 +180,7 @@ with gr.Blocks(css="footer{display:none !important}") as demo:
|
|
| 177 |
elem_id="input_box",
|
| 178 |
#submit_btn=True,
|
| 179 |
)
|
| 180 |
-
|
| 181 |
|
| 182 |
previous_prompt = gr.State("")
|
| 183 |
tie_count = gr.State(0)
|
|
@@ -189,6 +192,11 @@ with gr.Blocks(css="footer{display:none !important}") as demo:
|
|
| 189 |
buttons[0], buttons[1], tievote_btn, model_names_row, moreConsuming
|
| 190 |
])
|
| 191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
|
| 193 |
buttons[0].click(
|
| 194 |
record_vote_0,
|
|
|
|
| 53 |
"ip": request.client.host
|
| 54 |
})
|
| 55 |
print(request.client.host)
|
| 56 |
+
print(request.client)
|
| 57 |
+
print(request.headers)
|
| 58 |
+
print(request.client.host)
|
| 59 |
changeVisible = False
|
| 60 |
jsonResponse = response.json()
|
| 61 |
_id = jsonResponse["id"]
|
|
|
|
| 180 |
elem_id="input_box",
|
| 181 |
#submit_btn=True,
|
| 182 |
)
|
| 183 |
+
send_btn = gr.Button(value="Enviar", scale=0, variant="primary")
|
| 184 |
|
| 185 |
previous_prompt = gr.State("")
|
| 186 |
tie_count = gr.State(0)
|
|
|
|
| 192 |
buttons[0], buttons[1], tievote_btn, model_names_row, moreConsuming
|
| 193 |
])
|
| 194 |
|
| 195 |
+
send_btn.click(fn=lambda *args: send_prompt(*args),
|
| 196 |
+
inputs=[textbox],
|
| 197 |
+
outputs=[chatbot[0], chatbot[1], left_model, right_model,
|
| 198 |
+
buttons[0], buttons[1], tievote_btn, model_names_row, moreConsuming
|
| 199 |
+
])
|
| 200 |
|
| 201 |
buttons[0].click(
|
| 202 |
record_vote_0,
|