Spaces:
Runtime error
Runtime error
include the nudge in the stored data
Browse files
app.py
CHANGED
@@ -148,7 +148,7 @@ def chat(history1, history2, system_msg):
|
|
148 |
sleep(0.15)
|
149 |
|
150 |
|
151 |
-
def chosen_one(label, choice0_history, choice1_history, system_msg, rlhf_persona):
|
152 |
# Generate a uuid for each submission
|
153 |
arena_battle_id = str(uuid.uuid4())
|
154 |
|
@@ -161,6 +161,7 @@ def chosen_one(label, choice0_history, choice1_history, system_msg, rlhf_persona
|
|
161 |
'arena_battle_id': arena_battle_id,
|
162 |
'timestamp': timestamp,
|
163 |
'system_msg': system_msg,
|
|
|
164 |
'choice0_name': model_hermes.name,
|
165 |
'choice0': choice0_history,
|
166 |
'choice1_name': model_manticore.name,
|
@@ -246,7 +247,7 @@ with gr.Blocks() as arena:
|
|
246 |
)
|
247 |
|
248 |
choose1_click_event = choose1.click(
|
249 |
-
fn=chosen_one_first, inputs=[chatbot1, chatbot2, system_msg, rlhf_persona], outputs=[], queue=True
|
250 |
).then(
|
251 |
lambda *args: (
|
252 |
gr.update(visible=True, interactive=True),
|
@@ -261,7 +262,7 @@ with gr.Blocks() as arena:
|
|
261 |
)
|
262 |
|
263 |
choose2_click_event = choose2.click(
|
264 |
-
fn=chosen_one_second, inputs=[chatbot1, chatbot2, system_msg, rlhf_persona], outputs=[], queue=True
|
265 |
).then(
|
266 |
lambda *args: (
|
267 |
gr.update(visible=True, interactive=True),
|
|
|
148 |
sleep(0.15)
|
149 |
|
150 |
|
151 |
+
def chosen_one(label, choice0_history, choice1_history, system_msg, nudge_msg, rlhf_persona):
|
152 |
# Generate a uuid for each submission
|
153 |
arena_battle_id = str(uuid.uuid4())
|
154 |
|
|
|
161 |
'arena_battle_id': arena_battle_id,
|
162 |
'timestamp': timestamp,
|
163 |
'system_msg': system_msg,
|
164 |
+
'nudge_prefix': nudge_msg,
|
165 |
'choice0_name': model_hermes.name,
|
166 |
'choice0': choice0_history,
|
167 |
'choice1_name': model_manticore.name,
|
|
|
247 |
)
|
248 |
|
249 |
choose1_click_event = choose1.click(
|
250 |
+
fn=chosen_one_first, inputs=[chatbot1, chatbot2, system_msg, nudge_msg, rlhf_persona], outputs=[], queue=True
|
251 |
).then(
|
252 |
lambda *args: (
|
253 |
gr.update(visible=True, interactive=True),
|
|
|
262 |
)
|
263 |
|
264 |
choose2_click_event = choose2.click(
|
265 |
+
fn=chosen_one_second, inputs=[chatbot1, chatbot2, system_msg, nudge_msg, rlhf_persona], outputs=[], queue=True
|
266 |
).then(
|
267 |
lambda *args: (
|
268 |
gr.update(visible=True, interactive=True),
|