Spaces:
Sleeping
Sleeping
0.57 Spreadsheet row adjust
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ system_prompts = {
|
|
28 |
"Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
|
29 |
}
|
30 |
|
31 |
-
htmL_info = "<center><h1>⚔️ Pharia Bot Battle</h1><p><big>Let the games begin: In this arena, the Pharia 1 model competes against a random challenger.</
|
32 |
|
33 |
model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
|
34 |
"name": "Pharia 1 LLM 7B control hf"}]
|
@@ -242,7 +242,7 @@ def generate_both(system_prompt, input_text,
|
|
242 |
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
243 |
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
244 |
|
245 |
-
sheet_row = [system_prompt, input_text, max_new_tokens, temperature, repetition_penalty, chatbot_a_name, chatbot_a
|
246 |
|
247 |
logging.debug(f'{SPACER}\nOutput row: {sheet_row}') #list["in","out"]
|
248 |
return chatbot_a, chatbot_b
|
@@ -301,6 +301,8 @@ with gr.Blocks() as demo:
|
|
301 |
gr.HTML("<h2>Vote!</h2>")
|
302 |
with gr.Row(variant="panel"):
|
303 |
better_bot = gr.Radio(["Bot A kicks ass!", "Bot B crushes it!", "It's a draw."], label="Rate the output!")
|
|
|
|
|
304 |
|
305 |
language_dropdown.change(
|
306 |
lambda lang: system_prompts[lang],
|
|
|
28 |
"Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
|
29 |
}
|
30 |
|
31 |
+
htmL_info = "<center><h1>⚔️ Pharia Bot Battle</h1><p><big>Let the games begin: In this arena, the Pharia 1 model competes against a random challenger.</p><ul><li>Try a prompt in a language you want to explore</li><li>Set the parameters and vote for the best answers</li><li>After casting your vote, both bots reveal their identity</li></big></center>"
|
32 |
|
33 |
model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
|
34 |
"name": "Pharia 1 LLM 7B control hf"}]
|
|
|
242 |
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
243 |
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
244 |
|
245 |
+
sheet_row = [system_prompt, input_text, max_new_tokens, temperature, repetition_penalty, chatbot_a_name, chatbot_a, chatbot_b_name, chatbot_b]
|
246 |
|
247 |
logging.debug(f'{SPACER}\nOutput row: {sheet_row}') #list["in","out"]
|
248 |
return chatbot_a, chatbot_b
|
|
|
301 |
gr.HTML("<h2>Vote!</h2>")
|
302 |
with gr.Row(variant="panel"):
|
303 |
better_bot = gr.Radio(["Bot A kicks ass!", "Bot B crushes it!", "It's a draw."], label="Rate the output!")
|
304 |
+
|
305 |
+
gr.HTML("<p>Inputs, outputs and votes are logged anonymously.</p>")
|
306 |
|
307 |
language_dropdown.change(
|
308 |
lambda lang: system_prompts[lang],
|